diff --git a/src/main/java/io/github/darkkronicle/advancedchathud/config/gui/SharingScreen.java b/src/main/java/io/github/darkkronicle/advancedchathud/config/gui/SharingScreen.java index 869112b..0d85537 100644 --- a/src/main/java/io/github/darkkronicle/advancedchathud/config/gui/SharingScreen.java +++ b/src/main/java/io/github/darkkronicle/advancedchathud/config/gui/SharingScreen.java @@ -13,6 +13,7 @@ import fi.dy.masa.malilib.gui.GuiBase; import fi.dy.masa.malilib.gui.GuiTextFieldGeneric; import fi.dy.masa.malilib.gui.Message; +import fi.dy.masa.malilib.gui.button.IButtonActionListener; import fi.dy.masa.malilib.util.StringUtils; import io.github.darkkronicle.advancedchatcore.gui.buttons.NamedSimpleButton; import io.github.darkkronicle.advancedchathud.AdvancedChatHud; @@ -58,8 +59,11 @@ public void init() { this.addTextField(text, null); this.addButton( - new NamedSimpleButton(x, y, "advancedchat.gui.button.importtab"), - (button, mouseButton) -> importTab()); + x, y, "advancedchat.gui.button.importtab", (button, mouseButton) -> importTab()); + } + + private void addButton(int x, int y, String translation, IButtonActionListener listener) { + this.addButton(new NamedSimpleButton(x, y, StringUtils.translate(translation)), listener); } public void importTab() {