diff --git a/src/main/java/noppes/npcs/client/gui/SubGuiAnimationFrame.java b/src/main/java/noppes/npcs/client/gui/SubGuiAnimationFrame.java index b42aad538..5d7abbb4e 100644 --- a/src/main/java/noppes/npcs/client/gui/SubGuiAnimationFrame.java +++ b/src/main/java/noppes/npcs/client/gui/SubGuiAnimationFrame.java @@ -16,23 +16,23 @@ public class SubGuiAnimationFrame extends SubGuiInterface implements ITextfieldL super.initGui(); // //customized - button, enables all the following options. - this.addLabel(new GuiNpcLabel(52, "animation.customized", guiLeft, guiTop + 44, 0xFFFFFF)); - this.addButton(new GuiNpcButton(53, guiLeft + 60, guiTop + 38, 30, 20, new String[]{"gui.yes", "gui.no"}, editingFrame.isCustomized() ? 0 : 1)); + this.addLabel(new GuiNpcLabel(10, "animation.customized", guiLeft, guiTop + 44, 0xFFFFFF)); + this.addButton(new GuiNpcButton(10, guiLeft + 60, guiTop + 38, 30, 20, new String[]{"gui.yes", "gui.no"}, editingFrame.isCustomized() ? 0 : 1)); if (editingFrame.isCustomized()) { // //speed - textfield - this.addLabel(new GuiNpcLabel(131, "stats.speed", guiLeft, guiTop + 64, 0xFFFFFF)); - this.addTextField(new GuiNpcTextField(132, this, guiLeft + 60, guiTop + 60, 30, 15, editingFrame.speed + "")); - this.getTextField(132).floatsOnly = true; - this.getTextField(132).setMinMaxDefaultFloat(0, Float.MAX_VALUE, 1.0F); + this.addLabel(new GuiNpcLabel(11, "stats.speed", guiLeft, guiTop + 64, 0xFFFFFF)); + this.addTextField(new GuiNpcTextField(11, this, guiLeft + 60, guiTop + 60, 30, 15, editingFrame.speed + "")); + this.getTextField(11).floatsOnly = true; + this.getTextField(11).setMinMaxDefaultFloat(0, Float.MAX_VALUE, 1.0F); // //smooth - button - this.addLabel(new GuiNpcLabel(133, "animation.smoothing", guiLeft, guiTop + 84, 0xFFFFFF)); - this.addButton(new GuiNpcButton(134, guiLeft + 55, guiTop + 78, 60, 20, new String[]{"animation.smooth", "animation.linear", "gui.none"}, editingFrame.smooth)); + this.addLabel(new GuiNpcLabel(12, "animation.smoothing", guiLeft, guiTop + 84, 0xFFFFFF)); + this.addButton(new GuiNpcButton(12, guiLeft + 55, guiTop + 78, 60, 20, new String[]{"animation.smooth", "animation.linear", "gui.none"}, editingFrame.smooth)); // //ticks - button - this.addLabel(new GuiNpcLabel(135, "animation.tickType", guiLeft, guiTop + 104, 0xFFFFFF)); - this.addButton(new GuiNpcButton(136, guiLeft + 55, guiTop + 98, 75, 20, new String[]{"animation.renderTicks", "animation.mcTicks"}, editingFrame.renderTicks ? 0 : 1)); + this.addLabel(new GuiNpcLabel(13, "animation.tickType", guiLeft, guiTop + 104, 0xFFFFFF)); + this.addButton(new GuiNpcButton(13, guiLeft + 55, guiTop + 98, 75, 20, new String[]{"animation.renderTicks", "animation.mcTicks"}, editingFrame.renderTicks ? 0 : 1)); } } @@ -41,18 +41,18 @@ public class SubGuiAnimationFrame extends SubGuiInterface implements ITextfieldL super.actionPerformed(guibutton); int value = ((GuiNpcButton)guibutton).getValue(); - if (guibutton.id == 53 && editingFrame != null) { + if (guibutton.id == 10 && editingFrame != null) { editingFrame.setCustomized(!editingFrame.isCustomized()); - } else if (guibutton.id == 134 && editingFrame != null) { + } else if (guibutton.id == 12 && editingFrame != null) { editingFrame.smooth = (byte) value; - } else if (guibutton.id == 136 && editingFrame != null) { + } else if (guibutton.id == 13 && editingFrame != null) { editingFrame.renderTicks = value == 0; } } @Override public void unFocused(GuiNpcTextField textfield) { - if (textfield.id == 132 && this.editingFrame != null) { + if (textfield.id == 11 && this.editingFrame != null) { this.editingFrame.speed = textfield.getFloat(); } } diff --git a/src/main/java/noppes/npcs/client/gui/SubGuiAnimationOptions.java b/src/main/java/noppes/npcs/client/gui/SubGuiAnimationOptions.java index 4da1138d0..a04bd690b 100644 --- a/src/main/java/noppes/npcs/client/gui/SubGuiAnimationOptions.java +++ b/src/main/java/noppes/npcs/client/gui/SubGuiAnimationOptions.java @@ -18,20 +18,20 @@ public class SubGuiAnimationOptions extends SubGuiInterface { super.initGui(); // //ticks - button - this.addLabel(new GuiNpcLabel(35, "animation.tickType", guiLeft, guiTop + 86, 0xFFFFFF)); - this.addButton(new GuiNpcButton(36, guiLeft + 55, guiTop + 80, 75, 20, new String[]{"animation.renderTicks", "animation.mcTicks"}, animation.renderTicks ? 0 : 1)); + this.addLabel(new GuiNpcLabel(10, "animation.tickType", guiLeft, guiTop + 86, 0xFFFFFF)); + this.addButton(new GuiNpcButton(10, guiLeft + 55, guiTop + 80, 75, 20, new String[]{"animation.renderTicks", "animation.mcTicks"}, animation.renderTicks ? 0 : 1)); // //whileStanding - button - this.addLabel(new GuiNpcLabel(39, "animation.whileStanding", guiLeft, guiTop + 106, 0xFFFFFF)); - this.addButton(new GuiNpcButton(40, guiLeft + 75, guiTop + 100, 30, 20, new String[]{"gui.yes", "gui.no"}, animation.whileStanding ? 0 : 1)); + this.addLabel(new GuiNpcLabel(11, "animation.whileStanding", guiLeft, guiTop + 106, 0xFFFFFF)); + this.addButton(new GuiNpcButton(11, guiLeft + 75, guiTop + 100, 30, 20, new String[]{"gui.yes", "gui.no"}, animation.whileStanding ? 0 : 1)); // //whileAttacking - button - this.addLabel(new GuiNpcLabel(41, "animation.whileAttacking", guiLeft, guiTop + 126, 0xFFFFFF)); - this.addButton(new GuiNpcButton(42, guiLeft + 75, guiTop + 120, 30, 20, new String[]{"gui.yes", "gui.no"}, animation.whileAttacking ? 0 : 1)); + this.addLabel(new GuiNpcLabel(12, "animation.whileAttacking", guiLeft, guiTop + 126, 0xFFFFFF)); + this.addButton(new GuiNpcButton(12, guiLeft + 75, guiTop + 120, 30, 20, new String[]{"gui.yes", "gui.no"}, animation.whileAttacking ? 0 : 1)); // //whileMoving - button - this.addLabel(new GuiNpcLabel(43, "animation.whileMoving", guiLeft, guiTop + 146, 0xFFFFFF)); - this.addButton(new GuiNpcButton(44, guiLeft + 75, guiTop + 140, 30, 20, new String[]{"gui.yes", "gui.no"}, animation.whileMoving ? 0 : 1)); + this.addLabel(new GuiNpcLabel(13, "animation.whileMoving", guiLeft, guiTop + 146, 0xFFFFFF)); + this.addButton(new GuiNpcButton(13, guiLeft + 75, guiTop + 140, 30, 20, new String[]{"gui.yes", "gui.no"}, animation.whileMoving ? 0 : 1)); } @Override @@ -39,13 +39,13 @@ public class SubGuiAnimationOptions extends SubGuiInterface { super.actionPerformed(guibutton); int value = ((GuiNpcButton)guibutton).getValue(); - if (guibutton.id == 36) { + if (guibutton.id == 10) { animation.renderTicks = value == 0; - } else if (guibutton.id == 40) { + } else if (guibutton.id == 11) { animation.whileStanding = value == 0; - } else if (guibutton.id == 42) { + } else if (guibutton.id == 12) { animation.whileAttacking = value == 0; - } else if (guibutton.id == 44) { + } else if (guibutton.id == 13) { animation.whileMoving = value == 0; } } diff --git a/src/main/java/noppes/npcs/client/gui/global/GuiNPCEditAnimation.java b/src/main/java/noppes/npcs/client/gui/global/GuiNPCEditAnimation.java index 9dca5927f..02053f98e 100644 --- a/src/main/java/noppes/npcs/client/gui/global/GuiNPCEditAnimation.java +++ b/src/main/java/noppes/npcs/client/gui/global/GuiNPCEditAnimation.java @@ -157,8 +157,8 @@ public class GuiNPCEditAnimation extends GuiModelInterface implements ITextfield this.addButton(new GuiNpcButton(34, guiLeft + animationX + 55, guiTop + animationY + 40, 60, 20, new String[]{"animation.smooth", "animation.linear", "gui.none"}, animation.smooth)); // //loop - button - this.addLabel(new GuiNpcLabel(37, "animation.loopStart", guiLeft + animationX, guiTop + animationY + 66, 0xFFFFFF)); - this.addButton(new GuiNpcButton(38, guiLeft + animationX + 55, guiTop + animationY + 60, 75, 20, animation.loop == -1 ? "No Looping" : "Frame " + animation.loop)); + this.addLabel(new GuiNpcLabel(35, "animation.loopStart", guiLeft + animationX, guiTop + animationY + 66, 0xFFFFFF)); + this.addButton(new GuiNpcButton(36, guiLeft + animationX + 55, guiTop + animationY + 60, 75, 20, animation.loop == -1 ? "No Looping" : "Frame " + animation.loop)); //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -168,13 +168,13 @@ public class GuiNPCEditAnimation extends GuiModelInterface implements ITextfield int frameX = animationX; int frameY = playPauseY + 100; - this.addLabel(new GuiNpcLabel(49, "animation.frame", guiLeft + frameX + 40, guiTop + frameY, 0xFFFFFF)); + this.addLabel(new GuiNpcLabel(50, "animation.frame", guiLeft + frameX + 40, guiTop + frameY, 0xFFFFFF)); // //duration - textfield - this.addLabel(new GuiNpcLabel(50, "animation.duration", guiLeft + frameX, guiTop + frameY + 15, 0xFFFFFF)); - this.addTextField(new GuiNpcTextField(51, this, guiLeft + frameX + 60, guiTop + frameY + 11, 30, 15, editingFrame.duration + "")); - this.getTextField(51).integersOnly = true; - this.getTextField(51).setMinMaxDefaultFloat(0, Integer.MAX_VALUE, 10); + this.addLabel(new GuiNpcLabel(51, "animation.duration", guiLeft + frameX, guiTop + frameY + 15, 0xFFFFFF)); + this.addTextField(new GuiNpcTextField(52, this, guiLeft + frameX + 60, guiTop + frameY + 11, 30, 15, editingFrame.duration + "")); + this.getTextField(52).integersOnly = true; + this.getTextField(52).setMinMaxDefaultFloat(0, Integer.MAX_VALUE, 10); int bodyPartX = 280; int bodyPartY = -5; @@ -245,19 +245,19 @@ public class GuiNPCEditAnimation extends GuiModelInterface implements ITextfield this.getTextField(83).setMinMaxDefaultFloat(-Float.MAX_VALUE, Float.MAX_VALUE, 0); // //customized - button, enables all the following options. - this.addLabel(new GuiNpcLabel(152, "animation.customized", guiLeft + bodyPartX, guiTop + bodyPartY + 154, 0xFFFFFF)); - this.addButton(new GuiNpcButton(153, guiLeft + bodyPartX + 55, guiTop + bodyPartY + 148, 30, 20, new String[]{"gui.yes", "gui.no"}, editingPart.isCustomized() ? 0 : 1)); + this.addLabel(new GuiNpcLabel(84, "animation.customized", guiLeft + bodyPartX, guiTop + bodyPartY + 154, 0xFFFFFF)); + this.addButton(new GuiNpcButton(85, guiLeft + bodyPartX + 55, guiTop + bodyPartY + 148, 30, 20, new String[]{"gui.yes", "gui.no"}, editingPart.isCustomized() ? 0 : 1)); if (editingPart.isCustomized()) { // //speed - textfield - this.addLabel(new GuiNpcLabel(231, "stats.speed", guiLeft + bodyPartX, guiTop + bodyPartY + 174, 0xFFFFFF)); - this.addTextField(new GuiNpcTextField(232, this, guiLeft + bodyPartX + 60, guiTop + bodyPartY + 170, 30, 15, editingPart.speed + "")); - this.getTextField(232).floatsOnly = true; - this.getTextField(232).setMinMaxDefaultFloat(0, Float.MAX_VALUE, 1.0F); + this.addLabel(new GuiNpcLabel(86, "stats.speed", guiLeft + bodyPartX, guiTop + bodyPartY + 174, 0xFFFFFF)); + this.addTextField(new GuiNpcTextField(87, this, guiLeft + bodyPartX + 60, guiTop + bodyPartY + 170, 30, 15, editingPart.speed + "")); + this.getTextField(87).floatsOnly = true; + this.getTextField(87).setMinMaxDefaultFloat(0, Float.MAX_VALUE, 1.0F); // //smooth - button - this.addLabel(new GuiNpcLabel(233, "animation.smoothing", guiLeft + bodyPartX, guiTop + bodyPartY + 194, 0xFFFFFF)); - this.addButton(new GuiNpcButton(234, guiLeft + bodyPartX + 55, guiTop + bodyPartY + 190, 60, 20, new String[]{"animation.smooth", "animation.linear", "gui.none"}, editingPart.smooth)); + this.addLabel(new GuiNpcLabel(88, "animation.smoothing", guiLeft + bodyPartX, guiTop + bodyPartY + 194, 0xFFFFFF)); + this.addButton(new GuiNpcButton(89, guiLeft + bodyPartX + 55, guiTop + bodyPartY + 190, 60, 20, new String[]{"animation.smooth", "animation.linear", "gui.none"}, editingPart.smooth)); } } @@ -323,13 +323,13 @@ public class GuiNPCEditAnimation extends GuiModelInterface implements ITextfield this.editingPart = enumPart; } else if (guibutton.id == 68 && editingFrame != null) { editingFrame.removePart(this.editingPart.name()); - } else if (guibutton.id == 153 && editingFrame != null && part != null) { + } else if (guibutton.id == 85 && editingFrame != null && part != null) { part.setCustomized(!part.isCustomized()); } else if (guibutton.id == 34) { animation.smooth = (byte) value; - } else if (guibutton.id == 234 && part != null) { + } else if (guibutton.id == 89 && part != null) { part.smooth = (byte) value; - } else if (guibutton.id == 38) { + } else if (guibutton.id == 36) { animation.loop++; } else if (guibutton.id == 91) { if (!this.playingAnimation || !data.isActive()) { @@ -396,9 +396,9 @@ public class GuiNPCEditAnimation extends GuiModelInterface implements ITextfield frameIndex = textfield.getInteger(); } else if (textfield.id == 32) { animation.speed = textfield.getFloat(); - } else if (textfield.id == 232 && part != null) { + } else if (textfield.id == 87 && part != null) { part.speed = textfield.getFloat(); - } else if (textfield.id == 51 && frame != null) { + } else if (textfield.id == 52 && frame != null) { frame.duration = textfield.getInteger(); } else if (textfield.id >= 71 && textfield.id <= 73 && part != null) { part.rotation[textfield.id-71] = textfield.getFloat();