From 10aca282a4d04394e401c54462bedebab9b36674 Mon Sep 17 00:00:00 2001 From: Frakist <90983918+Frakist@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:50:56 +0300 Subject: [PATCH] some changes --- source/funkin/editors/SaveWarning.hx | 4 ++-- source/funkin/editors/character/CharacterEditor.hx | 6 +++++- source/funkin/editors/charter/Charter.hx | 2 +- .../funkin/editors/charter/CharterStrumlineScreen.hx | 11 ++++++----- source/funkin/game/PlayState.hx | 3 +-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/source/funkin/editors/SaveWarning.hx b/source/funkin/editors/SaveWarning.hx index 73b465ac..1b51fbfa 100644 --- a/source/funkin/editors/SaveWarning.hx +++ b/source/funkin/editors/SaveWarning.hx @@ -19,8 +19,8 @@ class SaveWarning { if (FlxG.state != null && FlxG.state is UIState) { FlxG.state.openSubState(new UIWarningSubstate("Unsaved Changes!", "Your changes will be lost if you don't save them. (Can't be recovered)\n\n\nWould you like to Cancel?", [{ - label: closingWindow ? "Exit Window" : "Exit To Menu", - color: 0x74732D, + label: closingWindow ? "Exit" : "Exit To Menu", + color: 0x742D2D, onClick: function(_) { if (!closingWindow) { if (selectionClass != null) FlxG.switchState(Type.createInstance(SaveWarning.selectionClass, [])); diff --git a/source/funkin/editors/character/CharacterEditor.hx b/source/funkin/editors/character/CharacterEditor.hx index 287b4a44..4628b929 100644 --- a/source/funkin/editors/character/CharacterEditor.hx +++ b/source/funkin/editors/character/CharacterEditor.hx @@ -224,7 +224,7 @@ class CharacterEditor extends UIState { FlxG.cameras.add(uiCamera); FlxG.cameras.add(animsCamera); - character = new Character(0,0,__character); + character = new Character(0,0,__character, false, false); character.debugMode = true; character.cameras = [charCamera]; @@ -346,6 +346,10 @@ class CharacterEditor extends UIState { } function buildCharacter():String { + if (character.isPlayer != character.playerOffsets) { + character.switchOffset('singLEFT', 'singRIGHT'); + character.switchOffset('singLEFTmiss', 'singRIGHTmiss'); + } var charXML:Xml = character.buildXML([ for (button in characterAnimsWindow.buttons.members) button.anim diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index d561d0ab..d2f19762 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -474,7 +474,7 @@ class Charter extends UIState { EventsData.reloadEvents(); PlayState.loadSong(__song, __diff, false, false); } - chart.noteTypes = [for (i in Paths.getFolderContent("data/notes")) haxe.io.Path.withoutExtension(i)]; + for (i in Paths.getFolderContent("data/notes")) chart.noteTypes.push(haxe.io.Path.withoutExtension(i)); for (i in Paths.getFolderContent("images/game/notes")) if (!chart.noteTypes.contains(haxe.io.Path.withoutExtension(i)) && haxe.io.Path.withoutExtension(i) != "default") chart.noteTypes.push(haxe.io.Path.withoutExtension(i)); diff --git a/source/funkin/editors/charter/CharterStrumlineScreen.hx b/source/funkin/editors/charter/CharterStrumlineScreen.hx index e6a04399..364c5ad8 100644 --- a/source/funkin/editors/charter/CharterStrumlineScreen.hx +++ b/source/funkin/editors/charter/CharterStrumlineScreen.hx @@ -110,11 +110,11 @@ class CharterStrumlineScreen extends UISubstateWindow { var strOffset:Float = strumLine.strumLinePos == null ? (strumLine.type == 1 ? 0.75 : 0.25) : strumLine.strumLinePos; - var startingPos:FlxPoint = strumLine.strumPos == null ? - FlxPoint.get((FlxG.width * strOffset) - ((Note.swagWidth * (strumLine.strumScale == null ? 1 : strumLine.strumScale)) * 2), 50) : - FlxPoint.get(strumLine.strumPos[0], strumLine.strumPos[1]); + var startingPos:FlxPoint = strumLine.strumLinePos == null ? + FlxPoint.get(strOffset, 50) : + FlxPoint.get(strOffset, strumLine.strumPos[1]); - hudXStepper = new UINumericStepper(hudScaleStepper.x + 80 - 32 + 26, hudScaleStepper.y, startingPos.x, 0.001, 2, null, null, 84); + hudXStepper = new UINumericStepper(hudScaleStepper.x + 80 - 32 + 26, hudScaleStepper.y, startingPos.x, 0.01, 2, 0, 2, 84); add(hudXStepper); addLabelOn(hudXStepper, "Hud Position (X,Y)"); @@ -150,7 +150,8 @@ class CharterStrumlineScreen extends UISubstateWindow { notes: strumLine.notes, position: ["DAD", "BOYFRIEND", "GIRLFRIEND"][stagePositionDropdown.index].toLowerCase(), visible: strumLine.visible, - strumPos: [hudXStepper.value, hudYStepper.value], + strumPos: [0, hudYStepper.value], + strumLinePos: hudXStepper.value, strumScale: hudScaleStepper.value }; if(!usesChartscrollSpeed.checked) newStrumLine.scrollSpeed = scrollSpeedStepper.value; diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 1d4a10fc..2d3a28bd 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -630,10 +630,9 @@ class PlayState extends MusicBeatState } var strOffset:Float = strumLine.strumLinePos == null ? (strumLine.type == 1 ? 0.75 : 0.25) : strumLine.strumLinePos; - var startingPos:FlxPoint = strumLine.strumPos == null ? FlxPoint.get((FlxG.width * strOffset) - ((Note.swagWidth * (strumLine.strumScale == null ? 1 : strumLine.strumScale)) * 2), this.strumLine.y) : - FlxPoint.get(strumLine.strumPos[0], strumLine.strumPos[1]); + FlxPoint.get(strumLine.strumPos[0] == 0 ? ((FlxG.width * strOffset) - ((Note.swagWidth * (strumLine.strumScale == null ? 1 : strumLine.strumScale)) * 2)) : strumLine.strumPos[0], strumLine.strumPos[1]); var strLine = new StrumLine(chars, startingPos,