diff options
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java | 4 | ||||
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MIntegerSelectionButton.java | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java index 866951ab..18aeef41 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java @@ -39,11 +39,11 @@ public class MButton extends MPanel { Gui.drawRect(0,0,bounds.width, bounds.height, bg.getRGB()); FontRenderer renderer = Minecraft.getMinecraft().fontRendererObj; - int width = renderer.getStringWidth(text); + int width = renderer.getStringWidth(getText()); int x = (bounds.width - width) / 2; int y = (bounds.height - renderer.FONT_HEIGHT) / 2; - renderer.drawString(text, x,y, foreground.getRGB()); + renderer.drawString(getText(), x,y, foreground.getRGB()); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MIntegerSelectionButton.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MIntegerSelectionButton.java index 9ba6350a..fc5ef5c0 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MIntegerSelectionButton.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MIntegerSelectionButton.java @@ -31,6 +31,7 @@ public class MIntegerSelectionButton extends MPanel { public void edit(String str) { try { data = Integer.parseInt(str); + onUpdate.run(); } catch (Exception e) {} } }; updateSelected(); add(selected); |