From 75e5e1f5418c118fc450a286d19014361c465a50 Mon Sep 17 00:00:00 2001 From: Kam Date: Thu, 9 Nov 2023 18:34:30 -0500 Subject: [PATCH] Position Fix when resizing GUI --- .../npcs/client/gui/global/GuiNPCEditAnimation.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 0c3cce242..d58cea415 100644 --- a/src/main/java/noppes/npcs/client/gui/global/GuiNPCEditAnimation.java +++ b/src/main/java/noppes/npcs/client/gui/global/GuiNPCEditAnimation.java @@ -257,6 +257,13 @@ public class GuiNPCEditAnimation extends GuiModelInterface implements ITextfield this.rotationSliders[i].width = 110; this.rotationSliders[i].height= 20; this.rotationSliders[i].xPosition = guiLeft + bodyPartX + 10; + + int yOffset = 20; + if(i != 0) + yOffset += 3; + yOffset *= i; + this.rotationSliders[i].yPosition = guiTop + bodyPartY + 105 + yOffset; + this.addSlider(this.rotationSliders[i]); } @@ -269,6 +276,12 @@ public class GuiNPCEditAnimation extends GuiModelInterface implements ITextfield this.pivotSliders[i].width = 110; this.pivotSliders[i].height = 20; this.pivotSliders[i].xPosition = guiLeft + bodyPartX + 10; + + int yOffset = 20; + if(i != 0) + yOffset += 3; + yOffset *= i; + this.pivotSliders[i].yPosition = guiTop + bodyPartY + 105 + yOffset; this.addSlider(this.pivotSliders[i]); }