aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorDoKM <mcazzyman@gmail.com>2021-07-21 15:17:52 +0200
committerDoKM <mcazzyman@gmail.com>2021-07-21 15:17:52 +0200
commit5116aead5bf99802c724794dd251ed0ff5604676 (patch)
tree803a37a84d9adf54ed8fce395611010087e55b3a /src/main
parent52569e58afb3a2c6be37a3ec81638bf551d6a6dc (diff)
downloadNotEnoughUpdates-5116aead5bf99802c724794dd251ed0ff5604676.tar.gz
NotEnoughUpdates-5116aead5bf99802c724794dd251ed0ff5604676.tar.bz2
NotEnoughUpdates-5116aead5bf99802c724794dd251ed0ff5604676.zip
make position of previous/next button static
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java10
1 files changed, 6 insertions, 4 deletions
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 fd70dadc..51a52109 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
@@ -616,8 +616,9 @@ public class GuiProfileViewer extends GuiScreen {
int invSizeY = inventoryRows*18+17+7;
int y = guiTop+101-invSizeY/2;
+ int staticSelectorHeight = guiTop+177;
- if(mouseY > y+invSizeY && mouseY < y+invSizeY+16) {
+ if(mouseY > staticSelectorHeight && mouseY < staticSelectorHeight+16) {
if(mouseX > guiLeft+320-12 && mouseX < guiLeft+320+12) {
if(mouseX < guiLeft+320) {
currentInventoryIndex--;
@@ -1993,6 +1994,7 @@ public class GuiProfileViewer extends GuiScreen {
int x = guiLeft+320-176/2;
int y = guiTop+101-invSizeY/2;
+ int staticSelectorHeight = guiTop+177;
this.drawTexturedModalRect(x, y, 0, 0, 176, inventoryRows*18+17);
this.drawTexturedModalRect(x, y+inventoryRows*18+17, 0, 215, 176, 7);
@@ -2000,7 +2002,7 @@ public class GuiProfileViewer extends GuiScreen {
boolean leftHovered = false;
boolean rightHovered = false;
if(Mouse.isButtonDown(0)) {
- if(mouseY > y+invSizeY && mouseY < y+invSizeY+16) {
+ if(mouseY > staticSelectorHeight && mouseY < staticSelectorHeight+16) {
if(mouseX > guiLeft+320-12 && mouseX < guiLeft+320+12) {
if(mouseX < guiLeft+320) {
leftHovered = true;
@@ -2013,11 +2015,11 @@ public class GuiProfileViewer extends GuiScreen {
Minecraft.getMinecraft().getTextureManager().bindTexture(resource_packs);
if(currentInventoryIndex > 0) {
- Utils.drawTexturedRect(guiLeft+320-12, y+invSizeY, 12, 16,
+ Utils.drawTexturedRect(guiLeft+320-12, staticSelectorHeight, 12, 16,
29/256f, 53/256f, !leftHovered?0:32/256f, !leftHovered?32/256f:64/256f, GL11.GL_NEAREST);
}
if(currentInventoryIndex < inventories.length-1) {
- Utils.drawTexturedRect(guiLeft+320, y+invSizeY, 12, 16,
+ Utils.drawTexturedRect(guiLeft+320, staticSelectorHeight, 12, 16,
5/256f, 29/256f, !rightHovered?0:32/256f, !rightHovered?32/256f:64/256f, GL11.GL_NEAREST);
}