From 1b0780f0f769c188e4aa7906b3875b055665e3bd Mon Sep 17 00:00:00 2001 From: kirillsaint Date: Sun, 8 Oct 2023 16:48:31 +0600 Subject: [PATCH] scroll fix --- .../net/silentclient/client/gui/quickplay/QuickplayGui.java | 2 +- .../net/silentclient/client/gui/quickplay/QuickplayModeGui.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/silentclient/client/gui/quickplay/QuickplayGui.java b/src/main/java/net/silentclient/client/gui/quickplay/QuickplayGui.java index daedd9e..11c318a 100644 --- a/src/main/java/net/silentclient/client/gui/quickplay/QuickplayGui.java +++ b/src/main/java/net/silentclient/client/gui/quickplay/QuickplayGui.java @@ -102,7 +102,7 @@ public class QuickplayGui extends SilentScreen { newScrollY += amountScrolled; else newScrollY = 0; - if((newScrollY < ((Math.ceil((Server.isRuHypixel() ? QuickPlayMod.ruhypixelQuickplayModes : QuickPlayMod.hypixelQuickplayModes).size() / 2) + 1) * 30) && (((Math.ceil((Server.isRuHypixel() ? QuickPlayMod.ruhypixelQuickplayModes : QuickPlayMod.hypixelQuickplayModes).size() / 2) + 1) * 30) + 24) > height) || amountScrolled < 0) { + if((newScrollY < (((Math.ceil(((Server.isRuHypixel() ? QuickPlayMod.ruhypixelQuickplayModes : QuickPlayMod.hypixelQuickplayModes).size() / 2)) + 1) * 40) + 24) && ((((Math.ceil((Server.isRuHypixel() ? QuickPlayMod.ruhypixelQuickplayModes : QuickPlayMod.hypixelQuickplayModes).size() / 2)) + 1) * 40) + 24) > height) || amountScrolled < 0) { this.scrollY = (float) newScrollY; if(this.scrollY < 0) { this.scrollY = 0; diff --git a/src/main/java/net/silentclient/client/gui/quickplay/QuickplayModeGui.java b/src/main/java/net/silentclient/client/gui/quickplay/QuickplayModeGui.java index abd2bea..759f827 100644 --- a/src/main/java/net/silentclient/client/gui/quickplay/QuickplayModeGui.java +++ b/src/main/java/net/silentclient/client/gui/quickplay/QuickplayModeGui.java @@ -120,7 +120,7 @@ public class QuickplayModeGui extends SilentScreen { newScrollY += amountScrolled; else newScrollY = 0; - if((newScrollY < ((Math.ceil(quickplayMode.modes.size() / 2) + 1) * 20) && (((Math.ceil(quickplayMode.modes.size() / 2) + 1) * 20) + 24 + 40) > height) || amountScrolled < 0) { + if((newScrollY < (((Math.ceil(quickplayMode.modes.size() / 2)) + 1) * 30) && ((((Math.ceil(quickplayMode.modes.size() / 2)) + 1) * 30) + 24 + 40) > height) || amountScrolled < 0) { this.scrollY = (float) newScrollY; if(this.scrollY < 0) { this.scrollY = 0;