Merge pull request #53 from Silent-Client/TEST2

scroll fix
This commit is contained in:
kirillsaint 2023-10-08 16:48:52 +06:00 committed by GitHub
commit 220badd59a
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; newScrollY += amountScrolled;
else else
newScrollY = 0; 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; this.scrollY = (float) newScrollY;
if(this.scrollY < 0) { if(this.scrollY < 0) {
this.scrollY = 0; this.scrollY = 0;

View File

@ -120,7 +120,7 @@ public class QuickplayModeGui extends SilentScreen {
newScrollY += amountScrolled; newScrollY += amountScrolled;
else else
newScrollY = 0; 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; this.scrollY = (float) newScrollY;
if(this.scrollY < 0) { if(this.scrollY < 0) {
this.scrollY = 0; this.scrollY = 0;