Fix Clipping Screen on Custom Effect Animated Texture Controls

This commit is contained in:
Kam committed 2026-03-06 05:21:03 -05:00
1 parent 0b1e4f9ed4
commit ce1ac1be84
1 file changed
+5 -1
@@ -109,7 +109,8 @@ public class SubGuiEffectGeneral extends SubGuiInterface implements ITextfieldLi
x = oldX - 4;
y += 23;
GuiScrollWindow scrollWindow = new GuiScrollWindow(this, x + 5, y, xSize - 20, ySize - 10 - (y - guiTop), 0) {
int scrollClipHeight = ySize - 10 - (y - guiTop);
GuiScrollWindow scrollWindow = new GuiScrollWindow(this, x + 5, y, xSize - 20, scrollClipHeight, 0) {
@Override
public void drawComponents(int mouseX, int mouseY, float partialTicks) {
super.drawComponents(mouseX, mouseY, partialTicks);
@@ -218,6 +219,9 @@ public class SubGuiEffectGeneral extends SubGuiInterface implements ITextfieldLi
));
}
int contentBottom = y + 20 + 5;
scrollWindow.maxScrollY = Math.max(0, contentBottom - scrollClipHeight);
}
private GuiNpcTextField setIntegerOnly(GuiNpcTextField field, int min, int max, int def) {