From cbcc4c3b4004cbf3f86aeab515ea94a93b4efd1e Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Fri, 30 Sep 2022 01:25:12 +1000 Subject: Fix for that 1 human who has gui scale 5 (#323) --- .../moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java index 8576f141..83d8fab9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -55,7 +55,6 @@ import org.lwjgl.opengl.GL14; import org.lwjgl.opengl.GL20; import java.awt.*; -import java.io.File; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; @@ -458,7 +457,7 @@ public class GuiProfileViewer extends GuiScreen { new Color(63, 224, 208, 255).getRGB() ); - if (profileDropdownSelected && !profile.getProfileNames().isEmpty() && scaledResolution.getScaleFactor() != 4) { + if (profileDropdownSelected && !profile.getProfileNames().isEmpty() && scaledResolution.getScaleFactor() < 4) { int dropdownOptionSize = scaledResolution.getScaleFactor() == 3 ? 10 : 20; int numProfiles = profile.getProfileNames().size(); @@ -912,7 +911,7 @@ public class GuiProfileViewer extends GuiScreen { if (mouseX > guiLeft && mouseX < guiLeft + 100 && profile != null && !profile.getProfileNames().isEmpty()) { ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); if (mouseY > guiTop + sizeY + 3 && mouseY < guiTop + sizeY + 23) { - if (scaledResolution.getScaleFactor() == 4) { + if (scaledResolution.getScaleFactor() >= 4) { profileDropdownSelected = false; int profileNum = 0; for (int index = 0; index < profile.getProfileNames().size(); index++) { @@ -937,7 +936,7 @@ public class GuiProfileViewer extends GuiScreen { } else { profileDropdownSelected = !profileDropdownSelected; } - } else if (scaledResolution.getScaleFactor() != 4 && profileDropdownSelected) { + } else if (scaledResolution.getScaleFactor() < 4 && profileDropdownSelected) { int dropdownOptionSize = scaledResolution.getScaleFactor() == 3 ? 10 : 20; int extraY = mouseY - (guiTop + sizeY + 23); int index = extraY / dropdownOptionSize; -- cgit