diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java | 10 |
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);
}
|