Merge pull request #54 from Silent-Client/TEST2

scroll fix
This commit is contained in:
kirillsaint 2023-10-08 16:49:07 +06:00 committed by GitHub
commit 931f6662a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;