From 876fdf88c580c51dc794188c71e12898e6616dd8 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Wed, 30 Dec 2020 14:12:27 +0900 Subject: use method, instead of field. using field direct is baaaaaad --- .../kr/syeyoung/dungeonsguide/roomedit/elements/MTabButton.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabButton.java') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabButton.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabButton.java index c21c1ff5..799c68a9 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabButton.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabButton.java @@ -42,12 +42,12 @@ public class MTabButton extends MPanel { bg = hover; } if (bg != null) - Gui.drawRect(0,0,bounds.width, bounds.height, bg.getRGB()); + Gui.drawRect(0,0,getBounds().width, getBounds().height, bg.getRGB()); FontRenderer renderer = Minecraft.getMinecraft().fontRendererObj; int width = renderer.getStringWidth(text); - int x = (bounds.width - width) / 2; - int y = (bounds.height - renderer.FONT_HEIGHT) / 2; + int x = (getBounds().width - width) / 2; + int y = (getBounds().height - renderer.FONT_HEIGHT) / 2; renderer.drawString(text, x,y, foreground.getRGB()); } -- cgit