fixing saving in character editor

This commit is contained in:
lunarcleint
2023-08-25 23:20:00 -07:00
parent fbcc043f8a
commit 8badd79d0c
3 changed files with 4 additions and 3 deletions
@@ -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;
+1 -2
View File
@@ -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;
+1
View File
@@ -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);