From e4cf9da188defb5c0183b06a7e13fa6ba6a79fb5 Mon Sep 17 00:00:00 2001 From: Kam Date: Tue, 12 Mar 2024 01:55:33 -0400 Subject: [PATCH] Range Properties Reorganization - Changes up position of GUI components --- .../client/gui/SubGuiNpcRangeProperties.java | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/src/main/java/noppes/npcs/client/gui/SubGuiNpcRangeProperties.java b/src/main/java/noppes/npcs/client/gui/SubGuiNpcRangeProperties.java index 608a012ee..364eec0b6 100644 --- a/src/main/java/noppes/npcs/client/gui/SubGuiNpcRangeProperties.java +++ b/src/main/java/noppes/npcs/client/gui/SubGuiNpcRangeProperties.java @@ -9,7 +9,7 @@ public class SubGuiNpcRangeProperties extends SubGuiInterface implements ITextfi { private DataStats stats; private GuiNpcSoundSelection gui; - + public SubGuiNpcRangeProperties(DataStats stats) { this.stats = stats; @@ -22,42 +22,50 @@ public class SubGuiNpcRangeProperties extends SubGuiInterface implements ITextfi public void initGui(){ super.initGui(); int y = guiTop + 4; - addTextField(new GuiNpcTextField(1,this, fontRendererObj, guiLeft + 85, y, 50, 18, stats.accuracy+"")); + addTextField(new GuiNpcTextField(1,this, fontRendererObj, guiLeft + 80, y, 50, 18, stats.accuracy+"")); addLabel(new GuiNpcLabel(1,"stats.accuracy", guiLeft + 5, y + 5)); getTextField(1).integersOnly = true; getTextField(1).setMinMaxDefault(0, 100, 90); - addTextField(new GuiNpcTextField(2,this, fontRendererObj, guiLeft + 85, y += 22, 50, 18, stats.rangedRange+"")); + + addTextField(new GuiNpcTextField(8, this, fontRendererObj, guiLeft + 200, y, 50, 18, stats.shotCount + "")); + addLabel(new GuiNpcLabel(8, "stats.shotcount", guiLeft + 135, y + 5)); + getTextField(8).integersOnly = true; + getTextField(8).setMinMaxDefault(1, Integer.MAX_VALUE, 1); + + addTextField(new GuiNpcTextField(2,this, fontRendererObj, guiLeft + 80, y += 22, 50, 18, stats.rangedRange+"")); addLabel(new GuiNpcLabel(2,"stats.rangedrange", guiLeft + 5, y + 5)); getTextField(2).integersOnly = true; - getTextField(2).setMinMaxDefault(1, Integer.MAX_VALUE, 2); - addTextField(new GuiNpcTextField(3,this, fontRendererObj, guiLeft + 85, y += 22, 50, 18, stats.minDelay+"")); + getTextField(2).setMinMaxDefault(1, 64, 2); + + addTextField(new GuiNpcTextField(3,this, fontRendererObj, guiLeft + 80, y += 22, 50, 18, stats.minDelay+"")); addLabel(new GuiNpcLabel(3,"stats.mindelay", guiLeft + 5, y + 5)); getTextField(3).integersOnly = true; getTextField(3).setMinMaxDefault(1, Integer.MAX_VALUE, 20); - addTextField(new GuiNpcTextField(4,this, fontRendererObj, guiLeft + 85, y += 22, 50, 18, stats.maxDelay+"")); - addLabel(new GuiNpcLabel(4,"stats.maxdelay", guiLeft + 5, y + 5)); + + addTextField(new GuiNpcTextField(4,this, fontRendererObj, guiLeft + 200, y, 50, 18, stats.maxDelay+"")); + addLabel(new GuiNpcLabel(4,"stats.maxdelay", guiLeft + 135, y + 5)); getTextField(4).integersOnly = true; getTextField(4).setMinMaxDefault(1, Integer.MAX_VALUE, 20); - addTextField(new GuiNpcTextField(5, this, fontRendererObj, guiLeft + 85, y += 22, 50, 18, stats.fireRate + "")); - addLabel(new GuiNpcLabel(5, "stats.burstspeed", guiLeft + 5, y + 5)); + + addTextField(new GuiNpcTextField(6, this, fontRendererObj, guiLeft + 80, y += 22, 50, 18, stats.burstCount + "")); + addLabel(new GuiNpcLabel(6, "stats.burstcount", guiLeft + 5, y + 5)); + getTextField(6).integersOnly = true; + getTextField(6).setMinMaxDefault(1, Integer.MAX_VALUE, 20); + + addTextField(new GuiNpcTextField(5, this, fontRendererObj, guiLeft + 200, y , 50, 18, stats.fireRate + "")); + addLabel(new GuiNpcLabel(5, "stats.burstspeed", guiLeft + 135, y + 5)); getTextField(5).integersOnly = true; getTextField(5).setMinMaxDefault(0, Integer.MAX_VALUE, 0); - addTextField(new GuiNpcTextField(6, this, fontRendererObj, guiLeft + 85, y += 22, 50, 18, stats.burstCount + "")); - addLabel(new GuiNpcLabel(6, "stats.burstcount", guiLeft + 5, y + 5)); - getTextField(6).integersOnly = true; - getTextField(6).setMinMaxDefault(1, Integer.MAX_VALUE, 20); - addTextField(new GuiNpcTextField(7,this, fontRendererObj, guiLeft + 85, y += 22, 100, 20, stats.fireSound)); + + + addTextField(new GuiNpcTextField(7,this, fontRendererObj, guiLeft + 80, y += 22, 100, 20, stats.fireSound)); addLabel(new GuiNpcLabel(7, "stats.firesound:", guiLeft + 5, y + 5)); addButton(new GuiNpcButton(7, guiLeft + 187, y, 60, 20, "gui.select")); - addTextField(new GuiNpcTextField(8, this, fontRendererObj, guiLeft + 85, y += 22, 50, 18, stats.shotCount + "")); - addLabel(new GuiNpcLabel(8, "stats.shotcount", guiLeft + 5, y + 5)); - getTextField(8).integersOnly = true; - getTextField(8).setMinMaxDefault(1, Integer.MAX_VALUE, 1); addButton(new GuiNpcButtonYesNo(9, guiLeft + 100, y += 22, stats.aimWhileShooting)); addLabel(new GuiNpcLabel(9, "stats.aimWhileShooting", guiLeft + 5, y + 5)); - + addButton(new GuiNpcButton(66, guiLeft + 190, guiTop + 190, 60, 20, "gui.done")); } @@ -103,7 +111,7 @@ public class SubGuiNpcRangeProperties extends SubGuiInterface implements ITextfi stats.shotCount = textfield.getInteger(); } } - + @Override public void elementClicked(){ getTextField(7).setText(gui.getSelected());