From 94a5d5b2bcc5583d0cee1c39877b2d1ddea77ae6 Mon Sep 17 00:00:00 2001 From: bconlon Date: Mon, 6 Jul 2020 08:21:23 -0700 Subject: [PATCH] Buttons now offset to the right when hovered. --- .../client/gui/menu/AetherMainMenu.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/legacy/aether/client/gui/menu/AetherMainMenu.java b/src/main/java/com/legacy/aether/client/gui/menu/AetherMainMenu.java index 90a115d..5c2f40e 100644 --- a/src/main/java/com/legacy/aether/client/gui/menu/AetherMainMenu.java +++ b/src/main/java/com/legacy/aether/client/gui/menu/AetherMainMenu.java @@ -487,7 +487,25 @@ public class AetherMainMenu extends GuiMainMenu for (int j = 0; j < this.buttonList.size(); ++j) { - ((GuiButton)this.buttonList.get(j)).drawButton(this.mc, p_73863_1_, p_73863_2_); + ((GuiButton) this.buttonList.get(j)).drawButton(this.mc, p_73863_1_, p_73863_2_); + + if ((this.buttonList.get(j)).getClass() == AetherMainMenuButton.class) + { + if (((GuiButton) this.buttonList.get(j)).func_146115_a()) + { + if (((GuiButton) this.buttonList.get(j)).xPosition < 45) + { + ((GuiButton) this.buttonList.get(j)).xPosition = ((GuiButton) this.buttonList.get(j)).xPosition + 4; + } + } + else + { + if (((GuiButton) this.buttonList.get(j)).xPosition > 30) + { + ((GuiButton) this.buttonList.get(j)).xPosition = ((GuiButton) this.buttonList.get(j)).xPosition - 4; + } + } + } } for (int j = 0; j < this.labelList.size(); ++j)