From ec5e0c308675ff959b3c10749086229ac462cae1 Mon Sep 17 00:00:00 2001 From: "Luis C.M" <42545778+c0508383@users.noreply.github.com> Date: Thu, 8 Jun 2023 07:41:45 -0500 Subject: [PATCH] Added button in dialogue visual options GUI for new top or bottom text display feature --- .../java/noppes/npcs/client/gui/SubGuiNpcDialogVisual.java | 6 ++++++ src/main/resources/assets/customnpcs/lang/en_US.lang | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogVisual.java b/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogVisual.java index 906cb0543..126b51751 100644 --- a/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogVisual.java +++ b/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogVisual.java @@ -98,6 +98,9 @@ public class SubGuiNpcDialogVisual extends SubGuiInterface implements ISubGuiLis addButton(new GuiNpcButton(10, guiLeft + 70, y += 22, 50, 20, new String[]{"gui.text", "gui.option", "display.fixed"}, dialog.titlePos)); addLabel(new GuiNpcLabel(10, "dialog.titlePos", guiLeft + 4, y + 5)); + addButton(new GuiNpcButton(24, guiLeft + 192, y, 50, 20, new String[]{"display.top", "display.bottom"}, dialog.alignment)); + addLabel(new GuiNpcLabel(27, "display.alignment", guiLeft + 126, y + 5)); + addTextField(new GuiNpcTextField(11, this, guiLeft + 120, y += 25, 40, 20, String.valueOf(dialog.textWidth))); addTextField(new GuiNpcTextField(12, this, guiLeft + 165, y, 40, 20, String.valueOf(dialog.textHeight))); addLabel(new GuiNpcLabel(12, "gui.widthHeight", guiLeft + 4, y + 5)); @@ -316,6 +319,9 @@ public class SubGuiNpcDialogVisual extends SubGuiInterface implements ISubGuiLis if (button.id == 10) { dialog.titlePos = button.getValue(); } + if (button.id == 24) { + dialog.alignment = (byte) button.getValue(); + } } if (activeMenu == 3) { diff --git a/src/main/resources/assets/customnpcs/lang/en_US.lang b/src/main/resources/assets/customnpcs/lang/en_US.lang index bd2a7017d..0d712eec1 100644 --- a/src/main/resources/assets/customnpcs/lang/en_US.lang +++ b/src/main/resources/assets/customnpcs/lang/en_US.lang @@ -205,6 +205,8 @@ display.right=Right display.botLeft=Bottom Left display.botCenter=Bottom Center display.botRight=Bottom Right +display.bottom=Bottom +display.top=Top display.fixed=Fixed display.glow=Glow display.solid=Solid