diff options
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java | 56 |
1 files changed, 49 insertions, 7 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java index 40e12e35..4d18ea18 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java @@ -25,11 +25,13 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.JsonParser; import com.google.gson.JsonPrimitive; +import io.github.moulberry.notenoughupdates.NEUOverlay; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.core.GlScissorStack; import io.github.moulberry.notenoughupdates.core.GuiElementTextField; import io.github.moulberry.notenoughupdates.core.util.lerp.LerpingInteger; import io.github.moulberry.notenoughupdates.options.NEUConfig; +import io.github.moulberry.notenoughupdates.overlays.EquipmentOverlay; import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; @@ -316,6 +318,13 @@ public class GuiInvButtonEditor extends GuiScreen { GlStateManager.color(1, 1, 1, 1); Utils.drawTexturedRect(guiLeft, guiTop, xSize, ySize, 0, xSize / 256f, 0, ySize / 256f, GL11.GL_NEAREST); + if (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud) { + EquipmentOverlay.INSTANCE.renderPreviewArmorHud(); + } + if (NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay) { + EquipmentOverlay.INSTANCE.renderPreviewPetInvHud(); + } + for (NEUConfig.InventoryButton button : NotEnoughUpdates.INSTANCE.config.hidden.inventoryButtons) { int x = guiLeft + button.x; int y = guiTop + button.y; @@ -326,6 +335,17 @@ public class GuiInvButtonEditor extends GuiScreen { y += ySize; } + if (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud) { + if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop && y < guiTop + 84) { + x -= 25; + } + } + if (NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay) { + if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop + 60 && y < guiTop + 120) { + x -= 25; + } + } + if (button.isActive()) { GlStateManager.color(1, 1, 1, 1f); } else { @@ -358,7 +378,7 @@ public class GuiInvButtonEditor extends GuiScreen { Minecraft.getMinecraft().getTextureManager().bindTexture(custom_ench_colour); GlStateManager.color(1, 1, 1, 1); Utils.drawTexturedRect( - guiLeft - 88 - 2 - 22, + guiLeft - 88 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0), guiTop + 2, 88, 20, @@ -369,7 +389,7 @@ public class GuiInvButtonEditor extends GuiScreen { GL11.GL_NEAREST ); Utils.drawTexturedRect( - guiLeft - 88 - 2 - 22, + guiLeft - 88 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0), guiTop + 2 + 24, 88, 20, @@ -382,7 +402,7 @@ public class GuiInvButtonEditor extends GuiScreen { Utils.drawStringCenteredScaledMaxWidth( "Load preset", fontRendererObj, - guiLeft - 44 - 2 - 22, + guiLeft - 44 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0), guiTop + 8, false, 86, @@ -391,7 +411,7 @@ public class GuiInvButtonEditor extends GuiScreen { Utils.drawStringCenteredScaledMaxWidth( "from Clipboard", fontRendererObj, - guiLeft - 44 - 2 - 22, + guiLeft - 44 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0), guiTop + 16, false, 86, @@ -400,7 +420,7 @@ public class GuiInvButtonEditor extends GuiScreen { Utils.drawStringCenteredScaledMaxWidth( "Save preset", fontRendererObj, - guiLeft - 44 - 2 - 22, + guiLeft - 44 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0), guiTop + 8 + 24, false, 86, @@ -409,7 +429,7 @@ public class GuiInvButtonEditor extends GuiScreen { Utils.drawStringCenteredScaledMaxWidth( "to Clipboard", fontRendererObj, - guiLeft - 44 - 2 - 22, + guiLeft - 44 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0), guiTop + 16 + 24, false, 86, @@ -417,7 +437,7 @@ public class GuiInvButtonEditor extends GuiScreen { ); if (!validShareContents()) { - Gui.drawRect(guiLeft - 88 - 2 - 22, guiTop + 2, guiLeft - 2 - 22, guiTop + 2 + 20, 0x80000000); + Gui.drawRect(guiLeft - 88 - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0), guiTop + 2, guiLeft - 2 - 22 - (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud ? 25 : 0), guiTop + 2 + 20, 0x80000000); } GlStateManager.color(1, 1, 1, 1); @@ -461,6 +481,17 @@ public class GuiInvButtonEditor extends GuiScreen { y += ySize; } + if (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud) { + if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop && y < guiTop + 84) { + x -= 25; + } + } + if (NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay) { + if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop + 60 && y < guiTop + 120) { + x -= 25; + } + } + GlStateManager.translate(0, 0, 300); editorLeft = x + 8 - editorXSize / 2; editorTop = y + 18 + 2; @@ -741,6 +772,17 @@ public class GuiInvButtonEditor extends GuiScreen { y += ySize; } + if (NotEnoughUpdates.INSTANCE.config.customArmour.enableArmourHud) { + if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop && y < guiTop + 84) { + x -= 25; + } + } + if (NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay) { + if (x < guiLeft + xSize - 150 && x > guiLeft + xSize - 200 && y > guiTop + 60 && y < guiTop + 120) { + x -= 25; + } + } + if (mouseX >= x && mouseY >= y && mouseX <= x + 18 && mouseY <= y + 18) { if (editingButton == button) { |
