aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2023-11-05 00:13:36 +1100
committerGitHub <noreply@github.com>2023-11-04 14:13:36 +0100
commitf197b517e5ced58eee13b3f9aef89156575d0540 (patch)
treeb88c8e7b74dfd235519d9f38469b6633575c0689 /src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java
parentdf476f63ccde2ff0c17d048e582ffa75e0d66088 (diff)
downloadnotenoughupdates-f197b517e5ced58eee13b3f9aef89156575d0540.tar.gz
notenoughupdates-f197b517e5ced58eee13b3f9aef89156575d0540.tar.bz2
notenoughupdates-f197b517e5ced58eee13b3f9aef89156575d0540.zip
Feature: Sacks page in pv (#891)
* sacks in pv * fix formatting * a bit more formatting * change location to make more sense * suggested changes * change colour * add coloured tooltips * remove some more magic numbers
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java
index ef4d5aa9..417ca9e6 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewerUtils.java
@@ -294,4 +294,15 @@ public class ProfileViewerUtils {
}
});
}
+
+ public static int onSlotToChangePage(int mouseX, int mouseY, int guiLeft, int guiTop) {
+ if (mouseX >= guiLeft - 29 && mouseX <= guiLeft) {
+ if (mouseY >= guiTop && mouseY <= guiTop + 28) {
+ return 1;
+ } else if (mouseY + 28 >= guiTop && mouseY <= guiTop + 28 * 2) {
+ return 2;
+ }
+ }
+ return 0;
+ }
}