aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-08-01 23:43:10 +0900
committersyeyoung <cyong06@naver.com>2021-08-01 23:43:10 +0900
commitd1c36c2412b98350f8336e38361e49b3655982d5 (patch)
tree34f2d6396f69840f623254b5c6e50c3563f5cfda /src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java
parent16a4367663f5ed2a909804de6d319c97c9854ecc (diff)
downloadSkyblock-Dungeons-Guide-d1c36c2412b98350f8336e38361e49b3655982d5.tar.gz
Skyblock-Dungeons-Guide-d1c36c2412b98350f8336e38361e49b3655982d5.tar.bz2
Skyblock-Dungeons-Guide-d1c36c2412b98350f8336e38361e49b3655982d5.zip
Too many changes to describe
Config gui overhaul.
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java
index 1a1f30d4..ff8061e7 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java
@@ -41,6 +41,7 @@ public class MButton extends MPanel {
private int background = RenderUtils.blendAlpha(0xFF141414, 0.08f);
private int hover = RenderUtils.blendAlpha(0xFF141414, 0.14f);
private int clicked = RenderUtils.blendAlpha(0xFF141414, 0.16f);
+ private int border = 0x0;
private int disabled =0xFF141414;
private boolean enabled = true;
@@ -59,8 +60,12 @@ public class MButton extends MPanel {
} else if (new Rectangle(new Point(0,0),bounds).contains(relMousex0, relMousey0)) {
bg = hover;
}
- Gui.drawRect(0,0,getBounds().width, getBounds().height, bg);
-
+ if (((border >> 24) & 0xFF) == 0)
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, bg);
+ else {
+ Gui.drawRect(0, 0, getBounds().width, getBounds().height, border);
+ Gui.drawRect(1, 1, getBounds().width-1, getBounds().height-1, bg);
+ }
FontRenderer renderer = Minecraft.getMinecraft().fontRendererObj;
int width = renderer.getStringWidth(getText());
int x = (getBounds().width - width) / 2;