mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-26 08:03:06 +00:00
Changed some IDs in the animation editor
This commit is contained in:
1 parent
2dade38396
commit
b207ef26c0
3 files changed
+46
-46
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user