unsaved shit in the chart editor wip

This commit is contained in:
lunarcleint
2023-08-23 19:33:51 -07:00
parent be234004ad
commit 8e9c0a74fc
4 changed files with 65 additions and 1 deletions
@@ -0,0 +1,36 @@
package funkin.backend.utils;
import openfl.Lib;
class WindowTitle {
public static var winTitle(default, set):String;
public static function set_winTitle(newWinTitle:String):String {
winTitle = newWinTitle;
updateTitle();
return newWinTitle;
}
public static var prefix(default, set):String = "";
public static function set_prefix(newPrefix:String):String {
prefix = newPrefix;
updateTitle();
return newPrefix;
}
public static var endfix(default, set):String = "";
public static function set_endfix(endPrefix:String):String {
endfix = endPrefix;
updateTitle();
return endPrefix;
}
public static inline function init()
reset();
public static inline function reset() {
winTitle = Lib.application.meta["name"];
prefix = endfix = "";
updateTitle();
}
public static inline function updateTitle()
Lib.application.window.title = '$prefix$winTitle$endfix';
}