From 8badd79d0c5b0d2ea5c5af6417548a184fc0409d Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Fri, 25 Aug 2023 23:20:00 -0700 Subject: [PATCH] fixing saving in character editor --- source/funkin/editors/character/CharacterEditor.hx | 3 ++- source/funkin/editors/charter/Charter.hx | 3 +-- source/funkin/editors/ui/UIState.hx | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/funkin/editors/character/CharacterEditor.hx b/source/funkin/editors/character/CharacterEditor.hx index 970288ff..b41a89cc 100644 --- a/source/funkin/editors/character/CharacterEditor.hx +++ b/source/funkin/editors/character/CharacterEditor.hx @@ -51,6 +51,7 @@ class CharacterEditor extends UIState { public override function create() { super.create(); + WindowTitle.endfix = " (Character Editor)"; topMenu = [ { label: "File", @@ -323,7 +324,7 @@ class CharacterEditor extends UIState { function _file_save(_) { #if sys sys.io.File.saveContent( - Assets.getPath(Paths.xml('characters/${character.curCharacter}')), + '${Paths.getAssetsRoot()}/data/characters/${character.curCharacter}.xml', buildCharacter() ); return; diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 9309f12e..6e7a89f2 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -464,7 +464,6 @@ class Charter extends UIState { Framerate.memoryCounter.alpha = 1; Framerate.codenameBuildField.alpha = 1; } - WindowTitle.reset(); super.destroy(); } @@ -954,7 +953,7 @@ class Charter extends UIState { updateDisplaySprites(); } - WindowTitle.prefix = undos.unsaved ? "UNSAVED | " : ""; + WindowTitle.prefix = undos.unsaved ? "● " : ""; } public static var startTime:Float = 0; diff --git a/source/funkin/editors/ui/UIState.hx b/source/funkin/editors/ui/UIState.hx index 716e277d..9aa8cac3 100644 --- a/source/funkin/editors/ui/UIState.hx +++ b/source/funkin/editors/ui/UIState.hx @@ -120,6 +120,7 @@ class UIState extends MusicBeatState { public override function destroy() { super.destroy(); + WindowTitle.reset(); __mousePos.put(); FlxG.stage.window.onKeyDown.remove(onKeyDown); FlxG.stage.window.onKeyUp.remove(onKeyUp);