diff --git a/src/main/java/betterquesting/client/gui2/editors/nbt/PanelScrollingNBT.java b/src/main/java/betterquesting/client/gui2/editors/nbt/PanelScrollingNBT.java index 94329da64..411855a48 100644 --- a/src/main/java/betterquesting/client/gui2/editors/nbt/PanelScrollingNBT.java +++ b/src/main/java/betterquesting/client/gui2/editors/nbt/PanelScrollingNBT.java @@ -169,27 +169,27 @@ private void refreshList() { if (entry.getId() == 10) // Object { - PanelButtonStorage btn = new PanelButtonStorage<>(new GuiRectangle(lw, i * 16, rw - 48, 16, 0), + PanelButtonStorage btn = new PanelButtonStorage<>(new GuiRectangle(lw, i * 16, rw - 32, 16, 0), btnEdit, getButtonTitle((NBTTagCompound) entry), k); this.addPanel(btn); - btn = new PanelButtonStorage<>(new GuiRectangle(width - 48, i * 16, 16, 16, 0), btnAdv, "...", k); + btn = new PanelButtonStorage<>(new GuiRectangle(width - 32, i * 16, 16, 16, 0), btnAdv, "...", k); this.addPanel(btn); } else if (entry.getId() == 9) // List { - PanelButtonStorage btn = new PanelButtonStorage<>(new GuiRectangle(lw, i * 16, rw - 32, 16, 0), btnEdit, "List...", k); + PanelButtonStorage btn = new PanelButtonStorage<>(new GuiRectangle(lw, i * 16, rw - 16, 16, 0), btnEdit, "List...", k); this.addPanel(btn); } else if (entry.getId() == 8) // Text { - PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 48, 16, 0), + PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 32, 16, 0), "" + ((NBTTagString) entry).getString(), FieldFilterString.INSTANCE); text.setCallback(new CallbackNBTTagString(tag, k)).setMaxLength(Integer.MAX_VALUE); this.addPanel(text); - PanelButtonStorage btn = new PanelButtonStorage<>(new GuiRectangle(width - 48, i * 16, 16, 16, 0), btnEdit, "Aa", k); + PanelButtonStorage btn = new PanelButtonStorage<>(new GuiRectangle(width - 32, i * 16, 16, 16, 0), btnEdit, "Aa", k); this.addPanel(btn); } else if (entry.getId() == 1) // Byte/Boolean { @@ -199,7 +199,7 @@ private void refreshList() { text.setMaxLength(Integer.MAX_VALUE); // Put callback here this.addPanel(text); - PanelButtonStorage btn = new PanelButtonStorage<>(new GuiRectangle(lw + rw / 2, i * 16, (int) Math.ceil(rw / 2F) - 32, 16, 0), + PanelButtonStorage btn = new PanelButtonStorage<>(new GuiRectangle(lw + rw / 2, i * 16, (int) Math.ceil(rw / 2F) - 16, 16, 0), btnEdit, ((NBTPrimitive) entry).getByte() > 0 ? "true" : "false", k); @@ -219,7 +219,7 @@ private void refreshList() { switch (entry.getId()) { case 2: // Short { - PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 32, 16, 0), + PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 16, 16, 0), "" + ((NBTPrimitive) entry).getShort(), FieldFilterNumber.SHORT); text.setCallback(new CallbackNBTPrimitive<>(tag, k, Short.class)).setMaxLength(Integer.MAX_VALUE); @@ -228,7 +228,7 @@ private void refreshList() { } case 3: // Integer { - PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 32, 16, 0), + PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 16, 16, 0), "" + ((NBTPrimitive) entry).getInt(), FieldFilterNumber.INT); text.setCallback(new CallbackNBTPrimitive<>(tag, k, Integer.class)).setMaxLength(Integer.MAX_VALUE); @@ -237,7 +237,7 @@ private void refreshList() { } case 4: // Long { - PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 32, 16, 0), + PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 16, 16, 0), "" + ((NBTPrimitive) entry).getLong(), FieldFilterNumber.LONG); text.setCallback(new CallbackNBTPrimitive<>(tag, k, Long.class)).setMaxLength(Integer.MAX_VALUE); @@ -246,7 +246,7 @@ private void refreshList() { } case 5: // Float { - PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 32, 16, 0), + PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 16, 16, 0), "" + ((NBTPrimitive) entry).getFloat(), FieldFilterNumber.FLOAT); text.setCallback(new CallbackNBTPrimitive<>(tag, k, Float.class)).setMaxLength(Integer.MAX_VALUE); @@ -255,7 +255,7 @@ private void refreshList() { } case 6: // Double { - PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 32, 16, 0), + PanelTextField text = new PanelTextField<>(new GuiRectangle(lw, i * 16, rw - 16, 16, 0), "" + ((NBTPrimitive) entry).getDouble(), FieldFilterNumber.DOUBLE); text.setCallback(new CallbackNBTPrimitive<>(tag, k, Double.class)).setMaxLength(Integer.MAX_VALUE); @@ -264,16 +264,12 @@ private void refreshList() { } } } else { - PanelTextBox err = new PanelTextBox(new GuiRectangle(lw, i * 16 + 4, rw - 48, 12, 0), + PanelTextBox err = new PanelTextBox(new GuiRectangle(lw, i * 16 + 4, rw - 16, 12, 0), entry.getClass().getSimpleName() + " Not Supported Yet").setAlignment(1); err.setColor(PresetColor.TEXT_MAIN.getColor()); this.addPanel(err); } - PanelButtonStorage btnI = new PanelButtonStorage<>(new GuiRectangle(width - 32, i * 16, 16, 16, 0), btnInsert, "+", k); - btnI.setTextHighlight(new GuiColorStatic(128, 128, 128, 255), new GuiColorStatic(0, 255, 0, 255), new GuiColorStatic(0, 255, 0, 255)); - this.addPanel(btnI); - PanelButtonStorage btnD = new PanelButtonStorage<>(new GuiRectangle(width - 16, i * 16, 16, 16, 0), btnDelete, "x", k); btnD.setTextHighlight(new GuiColorStatic(128, 128, 128, 255), new GuiColorStatic(255, 0, 0, 255), new GuiColorStatic(255, 0, 0, 255)); this.addPanel(btnD); @@ -281,9 +277,9 @@ private void refreshList() { i++; } - this.addPanel(new PanelGeneric(new GuiRectangle(0, i * 16, width - 32, 16, 0), null)); // Keeps the list from auto resizing + this.addPanel(new PanelGeneric(new GuiRectangle(0, i * 16, width - 16, 16, 0), null)); // Keeps the list from auto resizing - PanelButtonStorage btnI = new PanelButtonStorage<>(new GuiRectangle(width - 32, i * 16, 16, 16, 0), btnInsert, "+", ""); + PanelButtonStorage btnI = new PanelButtonStorage<>(new GuiRectangle(width - 16, i * 16, 16, 16, 0), btnInsert, "+", ""); btnI.setTextHighlight(new GuiColorStatic(128, 128, 128, 255), new GuiColorStatic(0, 255, 0, 255), new GuiColorStatic(0, 255, 0, 255)); this.addPanel(btnI); } else if (nbt.getId() == 9) // NBTTagList