diff --git a/assets/data/editors/layouts/stage/characterEditScreen.xml b/assets/data/editors/layouts/stage/characterEditScreen.xml
index 31f0e5ea..1836923b 100644
--- a/assets/data/editors/layouts/stage/characterEditScreen.xml
+++ b/assets/data/editors/layouts/stage/characterEditScreen.xml
@@ -51,7 +51,7 @@
-
+
diff --git a/source/funkin/backend/assets/Paths.hx b/source/funkin/backend/assets/Paths.hx
index 9a2b9a97..319a06e5 100644
--- a/source/funkin/backend/assets/Paths.hx
+++ b/source/funkin/backend/assets/Paths.hx
@@ -23,8 +23,33 @@ class Paths
});
}
- public static inline function getPath(file:String, ?library:String)
- return library != null ? '$library:assets/$library/$file' : 'assets/$file';
+ public static inline function getPath(file:String, ?library:String) {
+ var returnedPath:String = library != null ? '$library:assets/$library/$file' : 'assets/$file';
+ #if linux
+ returnedPath = Path.normalize(returnedPath);
+ var fixedPath:String = library != null ? '$library:assets/$library/' : 'assets/';
+ var parts:Array = returnedPath.split("/");
+ trace(parts);
+ for (it=>part in parts) {
+ if (it == 0) continue;
+ var entries:Array = null;
+ if (Path.extension(part) == "") entries = assetsTree.getFolders(fixedPath);
+ else entries = assetsTree.getFiles(fixedPath);
+ for (entry in entries) {
+ trace(part, entry);
+ if (entry.toLowerCase() == part.toLowerCase()) {
+ fixedPath += entry + (it != parts.length - 1 ? "/" : "");
+ }
+ }
+ }
+ if (returnedPath.toLowerCase() != fixedPath.toLowerCase()) {
+ trace("this shit broke!!!");
+ trace(fixedPath);
+ }
+ else returnedPath = fixedPath;
+ #end
+ return returnedPath;
+ }
public static inline function video(key:String, ?ext:String)
return getPath('videos/$key.${ext != null ? ext : Flags.VIDEO_EXT}');
diff --git a/source/funkin/backend/system/MainState.hx b/source/funkin/backend/system/MainState.hx
index 02a8a34a..a1ed11a6 100644
--- a/source/funkin/backend/system/MainState.hx
+++ b/source/funkin/backend/system/MainState.hx
@@ -113,6 +113,7 @@ class MainState extends FlxState {
ModsFolder.onModSwitch.dispatch(ModsFolder.currentModFolder); // Loads global.hx
MusicBeatTransition.script = Flags.DEFAULT_TRANSITION_SCRIPT;
WindowUtils.resetTitle();
+ WindowUtils.setWindow();
Main.refreshAssets();
DiscordUtil.init();
EventsData.reloadEvents();
diff --git a/source/funkin/backend/utils/WindowUtils.hx b/source/funkin/backend/utils/WindowUtils.hx
index ddf14596..82441459 100644
--- a/source/funkin/backend/utils/WindowUtils.hx
+++ b/source/funkin/backend/utils/WindowUtils.hx
@@ -63,7 +63,9 @@ final class WindowUtils {
* @param image The image to set as the icon.
**/
public static inline function setWindow(?name:String, ?image:String)
- { Lib.application.window.setIcon(lime.graphics.Image.fromBytes(Assets.getBytes(image != null ? image : Flags.MOD_ICON)));
+ {
+ if (Flags.MOD_ICON == null && image == null) return;
+ Lib.application.window.setIcon(lime.graphics.Image.fromBytes(Assets.getBytes(Paths.image(image != null ? image : Flags.MOD_ICON))));
title = name != null ? name : Flags.MOD_NAME;
}
diff --git a/source/funkin/menus/MainMenuState.hx b/source/funkin/menus/MainMenuState.hx
index 1a68f4a2..70716122 100644
--- a/source/funkin/menus/MainMenuState.hx
+++ b/source/funkin/menus/MainMenuState.hx
@@ -25,6 +25,8 @@ class MainMenuState extends MusicBeatState
var camFollow:FlxObject;
var versionText:FunkinText;
+ var devModeWarning:FunkinText;
+
public var canAccessDebugMenus:Bool = !Flags.DISABLE_EDITORS;
override function create()
@@ -85,10 +87,17 @@ class MainMenuState extends MusicBeatState
add(versionText);
changeItem();
+
+ devModeWarning = new FunkinText(0, FlxG.height - 50, 1280, "You have to enable DEVELOPER MODE in the miscellaneous settings!", 24);
+ devModeWarning.alignment = CENTER;
+ add(devModeWarning);
+ devModeWarning.scrollFactor.set();
+ devModeWarning.alpha = 0;
}
var selectedSomethin:Bool = false;
var forceCenterX:Bool = true;
+ var devModeCount:Int = 0;
override function update(elapsed:Float)
{
@@ -111,6 +120,17 @@ class MainMenuState extends MusicBeatState
}
*/
}
+ if (!Options.devMode && FlxG.keys.justPressed.SEVEN) {
+ FlxG.sound.play(Paths.sound(Flags.DEFAULT_EDITOR_DELETE_SOUND));
+ if (devModeCount++ == 2) {
+ FlxTween.tween(devModeWarning, {alpha: 1}, 0.4);
+ }
+ FlxTween.completeTweensOf(devModeWarning);
+ FlxTween.color(devModeWarning, 0.2, 0xFFFF0000, 0xFFFFFFFF);
+ FlxTween.shake(devModeWarning, 0.005);
+ devModeWarning.y = FlxG.height - 75;
+ FlxTween.tween(devModeWarning, {y: FlxG.height - 50}, 0.4);
+ }
var upP = controls.UP_P;
var downP = controls.DOWN_P;