diff options
author | CuzImClicks <bruno778.whiteelfie@gmail.com> | 2022-04-22 17:46:57 +0200 |
---|---|---|
committer | CuzImClicks <bruno778.whiteelfie@gmail.com> | 2022-04-22 17:46:57 +0200 |
commit | be49b91e35d939fc4afff8179af6c3405964c35c (patch) | |
tree | 08df99fad8c211a85a17f5b05c86e10501ec7f67 /src/main/java/me/Danker/gui/buttons | |
parent | b443b1840760300d6a58951829911025b57f1bfb (diff) | |
parent | c9c0ea6a3e3382fd236345b89bd0991c8b8cbb17 (diff) | |
download | SkyblockMod-be49b91e35d939fc4afff8179af6c3405964c35c.tar.gz SkyblockMod-be49b91e35d939fc4afff8179af6c3405964c35c.tar.bz2 SkyblockMod-be49b91e35d939fc4afff8179af6c3405964c35c.zip |
Merge remote-tracking branch 'upstream/development' into development
Diffstat (limited to 'src/main/java/me/Danker/gui/buttons')
-rw-r--r-- | src/main/java/me/Danker/gui/buttons/LocationButton.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/main/java/me/Danker/gui/buttons/LocationButton.java b/src/main/java/me/Danker/gui/buttons/LocationButton.java index f328c58..8da1ab9 100644 --- a/src/main/java/me/Danker/gui/buttons/LocationButton.java +++ b/src/main/java/me/Danker/gui/buttons/LocationButton.java @@ -40,24 +40,19 @@ public class LocationButton extends GuiButton { } this.longestText = longestText; + int offset = text2Offset == null ? 0 : text2Offset; this.height = (int) ((splitText.length * 9 + 3) * scale); - this.width = (int) ((this.longestText + 3) * scale); + this.width = (int) ((this.longestText + offset + 3) * scale); } @Override public void drawButton(Minecraft mc, int mouseX, int mouseY) { - if (text2 == null) { - drawRect(x - 2, y - 2, x + width, y + height, 0x40D3D3D3); - } else { - drawRect(x - 2, y - 2, (int) (x + (longestText + text2Offset + 3) * scale), y + height, 0x40D3D3D3); - new TextRenderer(mc, text2, (int) (x + (text2Offset * scale)), y, scale); - } + drawRect(x - 2, y - 2, x + width, y + height, 0x40D3D3D3); + if (text2 != null) new TextRenderer(mc, text2, (int) (x + (text2Offset * scale)), y, scale); new TextRenderer(mc, text, x, y, scale); } @Override - public void playPressSound(SoundHandler soundHandler) { - - } + public void playPressSound(SoundHandler soundHandler) {} } |