Skip to content

Commit

Permalink
ISSUE-0 - Add word loaded to mod number; Default to english if string…
Browse files Browse the repository at this point in the history
… is not found
  • Loading branch information
telvarost committed May 4, 2024
1 parent d97495d commit 1cc17a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public void drawMenuButton(CallbackInfo info) {
if (FabricLoader.getInstance().isModLoaded("legacytranslations")) {
TranslationStorage var2 = TranslationStorage.getInstance();
this.buttons.add(new ButtonWidget(100, this.width / 2 - 100, this.height / 4 + 72 - 16, 98, 20, var2.get("menu.texturepacks")));
this.buttons.add(new ModMenuButtonWidget(101, this.width / 2 + 2, this.height / 4 + 72 - 16, 98, 20, var2.get("menu.mods") + " (" + ModMenu.getFormattedModCount() + ")"));
String strLoaded = (var2.get("menu.mods.loaded").equals("menu.mods.loaded")) ? "loaded" : var2.get("menu.mods.loaded");
this.buttons.add(new ModMenuButtonWidget(101, this.width / 2 + 2, this.height / 4 + 72 - 16, 98, 20, var2.get("menu.mods") + " (" + ModMenu.getFormattedModCount() + " " + strLoaded + ")"));

} else {
this.buttons.add(new ButtonWidget(100, this.width / 2 - 100, this.height / 4 + 72 - 16, 98, 20, "Texture Packs"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public void drawMenuButton(CallbackInfo info) {
texturePackButton.text = var2.get("menu.texturepacks");
int newWidth = ((MixinGuiButton) texturePackButton).getWidth() / 2 - 1;
((MixinGuiButton) texturePackButton).setWidth(newWidth);
this.buttons.add(new ModMenuButtonWidget(100, this.width / 2 + 2, texturePackButton.y, newWidth, 20, var2.get("menu.mods") + " (" + ModMenu.getFormattedModCount() + ")"));
String strLoaded = (var2.get("menu.mods.loaded").equals("menu.mods.loaded")) ? "loaded" : var2.get("menu.mods.loaded");
this.buttons.add(new ModMenuButtonWidget(100, this.width / 2 + 2, texturePackButton.y, newWidth, 20, var2.get("menu.mods") + " (" + ModMenu.getFormattedModCount() + " " + strLoaded + ")"));
} else {
texturePackButton.text = "Texture Packs";
int newWidth = ((MixinGuiButton) texturePackButton).getWidth() / 2 - 1;
Expand Down

0 comments on commit 1cc17a4

Please sign in to comment.