Skip to content

Commit

Permalink
Modify MenuDef.shared at Package Time
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemon-King committed Aug 15, 2024
1 parent d1efa39 commit 165048e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
13 changes: 6 additions & 7 deletions resources/assets/menudef.shared
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ OptionMenu "HXDDSettings"
StaticText ""
StaticText ""
StaticText "$HXDD.MNU.SETTINGS.STATUS_BAR.TITLE", "Green"
IfNotGame(Doom) {
Option "Statusbar", "hxdd_statusbar_class", "%s"
}
IfGame(Doom) {
Option "Statusbar", "hxdd_statusbar_class", "%s"
}
Slider "$HXDD.MNU.SETTINGS.STATUSBAR.OPTION", "hxdd_statusbar_velocity_scale", 0.0, 1.0, 0.1, 2
StaticText ""
StaticText ""
Expand All @@ -226,13 +232,6 @@ OptionMenu "HXDDSettings"
StaticText ""
StaticText ""
StaticText ""
StaticText "Statusbar Selection", "Green"
IfNotGame(Doom) {
Option "Statusbar", "hxdd_statusbar_class", "HXDD_StatusBar_Selection"
}
IfGame(Doom) {
Option "Statusbar", "hxdd_statusbar_class", "HXDD_StatusBar_Selection_DOOM"
}
}

OptionMenu "HXDDAltSetup_OLD"
Expand Down
12 changes: 11 additions & 1 deletion src/main/java/lemon/hxdd/builder/PackageBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void Start() {
ExportHXDDFiles();
ExportRealm667();
AddMapInfoConfiguaration();

AddMenuDefConfiguration();

WriteInstallLanguageLookup();

Expand Down Expand Up @@ -763,6 +763,16 @@ private void AddMapInfoConfiguaration() {
formatFileContent(path + "/filter/game-doom/mapinfo.hxdd", classes);
}

private void AddMenuDefConfiguration() {
String path = this.app.settings.GetPath("temp");

String hx2Version = sourceVersions.get("hx2");
String suffixHX2 = (hx2Version != null && hx2Version.contains("BASE")) ? "_HX2" : "";
String optionValues = "HXDD_StatusBar_Selection" + suffixHX2;
String optionValuesDOOM = "HXDD_StatusBar_Selection_DOOM" + suffixHX2;
formatFileContent(path + "/menudef.shared", optionValues, optionValuesDOOM);
}

public void formatFileContent(String path, Object... formatArgs) {
File f = new File(path);

Expand Down

0 comments on commit 165048e

Please sign in to comment.