diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-05-06 16:49:24 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-05-06 16:49:24 +0200 |
commit | 3c7d6a1a4d49ef40969bef2cb67825862c41407c (patch) | |
tree | ac25bfc89e8e853142c64222676f32b6c19dff90 /src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java | |
parent | 5c7f1f9e2613b0ca5efac351e2c5e15c9deb0069 (diff) | |
download | OneConfig-3c7d6a1a4d49ef40969bef2cb67825862c41407c.tar.gz OneConfig-3c7d6a1a4d49ef40969bef2cb67825862c41407c.tar.bz2 OneConfig-3c7d6a1a4d49ef40969bef2cb67825862c41407c.zip |
fix scrolling
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java index febbfd0..44e019e 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java @@ -123,24 +123,15 @@ public class OneConfigGui extends GuiScreen { Scissor scissor = ScissorManager.scissor(vg, x + 224, y + 88, 1056, 698); if (prevPage != null) { pageProgress = MathUtils.easeInOutCirc(50, pageProgress, 832 - pageProgress, 220); - prevPage.draw(vg, (int) (x - pageProgress), y + 72); + prevPage.scrollWithDraw(vg, (int) (x - pageProgress), y + 72); RenderManager.drawLine(vg, (int) (x - pageProgress + 1055), y + 72, (int) (x - pageProgress + 1057), y + 800, 2, OneConfigConfig.GRAY_700); // TODO might remove this - currentPage.draw(vg, (int) (x - pageProgress + 1056), y + 72); + currentPage.scrollWithDraw(vg, (int) (x - pageProgress + 1056), y + 72); if (pageProgress > 830f) { // this number is the 'snap' point of the page prevPage = null; pageProgress = -224f; } } else { - if(currentPage.getMaxScrollHeight() == 728) { - currentPage.draw(vg, (int) (x - pageProgress), y + 72); - } else { - ScissorManager.resetScissor(vg, scissor); - scissorExclusionHeight = currentPage.drawStatic(vg, (int) (x - pageProgress), y + 72); - Scissor scissor1 = ScissorManager.scissor(vg, x + 224, y + 72 + scissorExclusionHeight, 1056, 698 - scissorExclusionHeight); - currentPage.scrollWithDraw(vg, (int) (x - pageProgress), y + 72); - ScissorManager.resetScissor(vg, scissor1); - } - + currentPage.scrollWithDraw(vg, (int) (x - pageProgress), y + 72); } ScissorManager.resetScissor(vg, scissor); if (currentColorSelector != null) { |