aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2020-12-24 12:51:33 +0900
committersyeyoung <cyong06@naver.com>2020-12-24 12:51:33 +0900
commit84011d2cc383aec605b13c2cfaa31e68d1af5604 (patch)
tree75613bf6263c28ffd3b91555d073bfbbdfe6aea2 /src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements
parent9d82a605330cb1993a0518f6168d01e7df411ad5 (diff)
downloadSkyblock-Dungeons-Guide-84011d2cc383aec605b13c2cfaa31e68d1af5604.tar.gz
Skyblock-Dungeons-Guide-84011d2cc383aec605b13c2cfaa31e68d1af5604.tar.bz2
Skyblock-Dungeons-Guide-84011d2cc383aec605b13c2cfaa31e68d1af5604.zip
configuration
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java4
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MIntegerSelectionButton.java1
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);