From b4aeff1d7c1160923fe842523dfc6374e7fdc51d Mon Sep 17 00:00:00 2001 From: MAZ12211 Date: Tue, 3 Jun 2025 17:46:15 +0300 Subject: [PATCH 1/3] commit --- data/ui/mod-menu/config-ui.xml | 8 ++++---- scripts/ModMenuMain.hxc | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/data/ui/mod-menu/config-ui.xml b/data/ui/mod-menu/config-ui.xml index 3123941..3db3826 100644 --- a/data/ui/mod-menu/config-ui.xml +++ b/data/ui/mod-menu/config-ui.xml @@ -1,4 +1,4 @@ - + - \ No newline at end of file + \ No newline at end of file diff --git a/scripts/ModMenuMain.hxc b/scripts/ModMenuMain.hxc index e4230aa..94c7501 100644 --- a/scripts/ModMenuMain.hxc +++ b/scripts/ModMenuMain.hxc @@ -1,5 +1,6 @@ import funkin.graphics.FunkinSprite; import funkin.modding.PolymodHandler; +import funkin.modding.PolymodErrorHandler; import funkin.modding.base.ScriptedMusicBeatSubState; import funkin.modding.events.ScriptEvent; import funkin.modding.module.ScriptedModule; @@ -27,7 +28,9 @@ class ModMenuMain extends ScriptedModule { function new() { super("ModMenuMain"); - config = new JsonConfig("ModMenu", configValues); + // startsWith didn't work on my end for some reason even after importing + if (PolymodHandler.loadedModIds.contains("JsonConfig-0.6.x")) config = new JsonConfig("ModMenu", configValues); + else PolymodErrorHandler.showAlert("Dependency Missing for Mod Menu", "JsonConfg mod is not found or disabled.\nPlease download it."); } override function onCreate(event:ScriptEvent) { From b26c12014b75c81d0a5c02b9ef792d91c371bc1c Mon Sep 17 00:00:00 2001 From: MAZ12211 Date: Tue, 3 Jun 2025 22:50:54 +0300 Subject: [PATCH 2/3] center config items --- data/ui/mod-menu/config-ui.xml | 30 ++++++++++++++---------------- scripts/ModConfigSubState.hxc | 2 +- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/data/ui/mod-menu/config-ui.xml b/data/ui/mod-menu/config-ui.xml index d28c98b..0bfc4ad 100644 --- a/data/ui/mod-menu/config-ui.xml +++ b/data/ui/mod-menu/config-ui.xml @@ -8,12 +8,22 @@ color: #FFFFFF; filter: drop-shadow(1, 45, #000000, 1, 6, 6, 3, 3); } - .intContainer { + #configView { background-color: #000000; - background-opacity: 1; + background-opacity: 0.2; + border-radius: 0px; + width: 100%; + } + .intContainer, .boolContainer { + background-color:#000000; + background-opacity: 0.1; padding: 7px; border-radius: 5px; border:2px solid #444444; + width: 85%; + vertical-align: center; + horizontal-align: center; + } .intStepper { height: 30px; @@ -21,13 +31,8 @@ font-name: "Inconsolata"; font-size: 17px; background-opacity: 0.7; - } - .boolContainer { - background-color: #000000; - background-opacity: 0.3; - padding: 7px; - border-radius: 5px; - border:2px solid #444444; + vertical-align: right; + horizontal-align: right; } .floatStepper { height: 28px; @@ -52,13 +57,6 @@ .resetBtn:hover { border-radius: 5px; } - #configView { - background-color: #000000; - background-opacity: 0.2; - border-radius: 0px; - width: 101%; - left: -2px; - } #configButton { width: 257px; height: 35px; diff --git a/scripts/ModConfigSubState.hxc b/scripts/ModConfigSubState.hxc index 2433323..d26a0a0 100644 --- a/scripts/ModConfigSubState.hxc +++ b/scripts/ModConfigSubState.hxc @@ -94,7 +94,7 @@ class ModConfigSubState extends ScriptedMusicBeatSubState { configView.id = "configView"; configView.camera = configCam; - configView.percentWidth = 100; + configView.percentContentWidth = 100; configView.top = 70; configView.percentHeight = 80; add(configView); From 953581b5d1dafa7149e160bba02c9aede642dc71 Mon Sep 17 00:00:00 2001 From: MAZ12211 Date: Tue, 3 Jun 2025 22:52:59 +0300 Subject: [PATCH 3/3] remove unused import --- scripts/ModMenuMain.hxc | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/ModMenuMain.hxc b/scripts/ModMenuMain.hxc index ce4ba8a..b5543f3 100644 --- a/scripts/ModMenuMain.hxc +++ b/scripts/ModMenuMain.hxc @@ -1,6 +1,5 @@ import funkin.graphics.FunkinSprite; import funkin.modding.PolymodHandler; -import funkin.modding.PolymodErrorHandler; import funkin.modding.base.ScriptedMusicBeatSubState; import funkin.modding.events.ScriptEvent; import funkin.modding.module.ScriptedModule;