scroll fix

This commit is contained in:
kirillsaint 2023-10-08 16:48:31 +06:00
parent 7c5c6db235
commit 1b0780f0f7
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;