Skip to content

Commit

Permalink
Merge branch 'major-refactor' into 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
Prospector committed Feb 1, 2021
2 parents b9a15ed + 2d1dd36 commit 3876384
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ public enum ModsButtonStyle {
REPLACE_REALMS(true),
@SerializedName("shrink")
SHRINK(false),
@SerializedName("fabric_icon")
FABRIC_ICON(false);
@SerializedName("icon")
ICON(false);

private final boolean titleScreenOnly;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private static void afterTitleScreenInit(Screen screen) {
buttons.add(modsButtonIndex, new ModMenuButtonWidget(screen.width / 2 - 100, buttonsY + spacing * 3 - (spacing / 2), 200, 20, getModsButtonText(), screen));
} else if (ModMenuConfig.MODS_BUTTON_STYLE.getValue() == ModMenuConfig.ModsButtonStyle.SHRINK) {
buttons.add(modsButtonIndex, new ModMenuButtonWidget(screen.width / 2 + 2, buttonsY + spacing * 2, 98, 20, getModsButtonText(), screen));
} else if (ModMenuConfig.MODS_BUTTON_STYLE.getValue() == ModMenuConfig.ModsButtonStyle.FABRIC_ICON) {
} else if (ModMenuConfig.MODS_BUTTON_STYLE.getValue() == ModMenuConfig.ModsButtonStyle.ICON) {
buttons.add(modsButtonIndex, new ModMenuTexturedButtonWidget(screen.width / 2 + 104, buttonsY + spacing * 2, 20, 20, 0, 0, FABRIC_ICON_BUTTON_LOCATION, 32, 64, button -> MinecraftClient.getInstance().openScreen(new ModsScreen(screen)), getModsButtonText()));
}
}
Expand Down Expand Up @@ -92,7 +92,7 @@ private static void afterGameMenuScreenInit(Screen screen) {
if (modsButtonIndex != -1) {
if (style == ModMenuConfig.ModsButtonStyle.CLASSIC) {
buttons.add(modsButtonIndex, new ModMenuButtonWidget(screen.width / 2 - 102, buttonsY + spacing * 3 - (spacing / 2), 204, 20, getModsButtonText(), screen));
} else if (style == ModMenuConfig.ModsButtonStyle.FABRIC_ICON) {
} else if (style == ModMenuConfig.ModsButtonStyle.ICON) {
buttons.add(modsButtonIndex, new ModMenuTexturedButtonWidget(screen.width / 2 + 4 + 100 + 2, screen.height / 4 + 72 + -16, 20, 20, 0, 0, FABRIC_ICON_BUTTON_LOCATION, 32, 64, button -> MinecraftClient.getInstance().openScreen(new ModsScreen(screen)), getModsButtonText()));
}
}
Expand All @@ -114,7 +114,7 @@ private static void shiftButtons(AbstractButtonWidget button, boolean shiftUp, i

private static Text getModsButtonText() {
TranslatableText modsText = new TranslatableText("modmenu.title");
if (ModMenuConfig.MOD_COUNT_LOCATION.getValue().isOnModsButton() && ModMenuConfig.MODS_BUTTON_STYLE.getValue() != ModMenuConfig.ModsButtonStyle.FABRIC_ICON) {
if (ModMenuConfig.MOD_COUNT_LOCATION.getValue().isOnModsButton() && ModMenuConfig.MODS_BUTTON_STYLE.getValue() != ModMenuConfig.ModsButtonStyle.ICON) {
if (ModMenuConfig.MODS_BUTTON_STYLE.getValue() == ModMenuConfig.ModsButtonStyle.SHRINK) {
modsText.append(new LiteralText(" ")).append(new TranslatableText("modmenu.loaded.short", ModMenu.getDisplayedModCount()));
} else {
Expand Down
Binary file modified src/main/resources/assets/modmenu/textures/gui/mods_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3876384

Please sign in to comment.