From 6246f663008336c6eff38818320a236bdb6a0fdd Mon Sep 17 00:00:00 2001 From: James Seibel Date: Tue, 3 Feb 2026 07:20:16 -0600 Subject: [PATCH] Minor UI class renaming --- .../common/wrappers/gui/ClassicConfigGUI.java | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java index 76caea7fb..c7737ae2c 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/gui/ClassicConfigGUI.java @@ -27,7 +27,6 @@ import com.seibel.distanthorizons.core.logging.DhLoggerBuilder; import com.seibel.distanthorizons.core.util.AnnotationUtil; import com.seibel.distanthorizons.core.wrapperInterfaces.config.IConfigGui; import com.seibel.distanthorizons.core.wrapperInterfaces.config.ILangWrapper; -import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper; import com.seibel.distanthorizons.coreapi.ModInfo; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; @@ -124,9 +123,9 @@ public class ClassicConfigGUI /** if you want to get this config gui's screen call this */ public static Screen getScreen(Screen parent, String category) - { return new ConfigScreen(parent, category); } + { return new DhConfigScreen(parent, category); } - private static class ConfigScreen extends DhScreen + private static class DhConfigScreen extends DhScreen { private static final ILangWrapper LANG_WRAPPER = SingletonInjector.INSTANCE.get(ILangWrapper.class); @@ -146,7 +145,7 @@ public class ClassicConfigGUI // constructor // //=============// - protected ConfigScreen(Screen parent, String category) + protected DhConfigScreen(Screen parent, String category) { super(Translatable( LANG_WRAPPER.langExists(ModInfo.ID + ".config" + (category.isEmpty() ? "." + category : "") + ".title") ? @@ -758,7 +757,7 @@ public class ClassicConfigGUI } - ButtonEntry button = ButtonEntry.BUTTON_BY_WIDGET.get(hoveredWidget); + DhButtonEntry button = DhButtonEntry.BUTTON_BY_WIDGET.get(hoveredWidget); // A quick fix for tooltips on linked entries @@ -824,7 +823,7 @@ public class ClassicConfigGUI // helper classes // //================// - public static class ConfigListWidget extends ContainerObjectSelectionList + public static class ConfigListWidget extends ContainerObjectSelectionList { Font textRenderer; @@ -840,15 +839,15 @@ public class ClassicConfigGUI this.textRenderer = minecraftClient.font; } - public void addButton(ConfigScreen gui, AbstractConfigBase dhConfigType, AbstractWidget button, AbstractWidget resetButton, AbstractWidget indexButton, Component text) - { this.addEntry(new ButtonEntry(gui, dhConfigType, button, text, resetButton, indexButton)); } + public void addButton(DhConfigScreen gui, AbstractConfigBase dhConfigType, AbstractWidget button, AbstractWidget resetButton, AbstractWidget indexButton, Component text) + { this.addEntry(new DhButtonEntry(gui, dhConfigType, button, text, resetButton, indexButton)); } @Override public int getRowWidth() { return 10_000; } public AbstractWidget getHoveredButton(double mouseX, double mouseY) { - for (ButtonEntry buttonEntry : this.children()) + for (DhButtonEntry buttonEntry : this.children()) { AbstractWidget button = buttonEntry.button; if (button != null @@ -879,13 +878,13 @@ public class ClassicConfigGUI } - public static class ButtonEntry extends ContainerObjectSelectionList.Entry + public static class DhButtonEntry extends ContainerObjectSelectionList.Entry { private static final Font textRenderer = Minecraft.getInstance().font; private final AbstractWidget button; - private final ConfigScreen gui; + private final DhConfigScreen gui; private final AbstractConfigBase dhConfigType; private final AbstractWidget resetButton; @@ -897,12 +896,12 @@ public class ClassicConfigGUI private final EConfigCommentTextPosition textPosition; public static final Map TEXT_BY_WIDGET = new HashMap<>(); - /// TODO we should just use a wrapper or something - public static final Map BUTTON_BY_WIDGET = new HashMap<>(); + public static final Map BUTTON_BY_WIDGET = new HashMap<>(); - public ButtonEntry(ConfigScreen gui, AbstractConfigBase dhConfigType, + public DhButtonEntry( + DhConfigScreen gui, AbstractConfigBase dhConfigType, AbstractWidget button, Component text, AbstractWidget resetButton, AbstractWidget indexButton) { TEXT_BY_WIDGET.put(button, text);