aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
diff options
context:
space:
mode:
authorPhoebe <77941535+catgirlseraid@users.noreply.github.com>2024-05-17 22:29:33 +1200
committerGitHub <noreply@github.com>2024-05-17 12:29:33 +0200
commit26f5797bf55cbc34c5c0ae606e6560bb0a1c5661 (patch)
treeefcc69f7c95042e2ab74ddc4268927f8db2939f9 /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
parent09dda65fe0f7280836dedf764945cf9af9e844ba (diff)
downloadnotenoughupdates-26f5797bf55cbc34c5c0ae606e6560bb0a1c5661.tar.gz
notenoughupdates-26f5797bf55cbc34c5c0ae606e6560bb0a1c5661.tar.bz2
notenoughupdates-26f5797bf55cbc34c5c0ae606e6560bb0a1c5661.zip
Add tooltip in pv tabs and cookie buff to pv (#1173)
Co-authored-by: SeRaid <77941535+SeRaid743@users.noreply.github.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
index 1e785f58..1e8fb423 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
@@ -585,7 +585,9 @@ public class Utils {
int yIndex,
ItemStack itemStack,
boolean pressed,
- GuiProfileViewer guiProfileViewer
+ GuiProfileViewer guiProfileViewer,
+ int mouseX,
+ int mouseY
) {
int guiLeft = GuiProfileViewer.getGuiLeft();
int guiTop = GuiProfileViewer.getGuiTop();
@@ -643,6 +645,9 @@ public class Utils {
GlStateManager.enableDepth();
drawItemStack(itemStack, x + 8, y + 7);
+ if (mouseY > y && mouseX > x && mouseY < y + 28 && mouseX < x + 28) {
+ guiProfileViewer.tooltipToDisplay = Collections.singletonList(itemStack.getDisplayName());
+ }
}
public static void drawTexturedRect(float x, float y, float width, float height, int filter) {