aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2020-12-30 14:12:27 +0900
committersyeyoung <cyong06@naver.com>2020-12-30 14:12:27 +0900
commit876fdf88c580c51dc794188c71e12898e6616dd8 (patch)
treebf25e93f6f95507fd90aacc133f0fd8be801634a /src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java
parent00c92d34b5373441f798da15341d5606693be684 (diff)
downloadSkyblock-Dungeons-Guide-876fdf88c580c51dc794188c71e12898e6616dd8.tar.gz
Skyblock-Dungeons-Guide-876fdf88c580c51dc794188c71e12898e6616dd8.tar.bz2
Skyblock-Dungeons-Guide-876fdf88c580c51dc794188c71e12898e6616dd8.zip
use method, instead of field.
using field direct is baaaaaad
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java
index 457f24fc..d01b858f 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java
@@ -32,14 +32,14 @@ public class MLabel extends MPanel {
int width = renderer.getStringWidth(getText());
int x,y;
if (alignment == Alignment.CENTER) {
- x = (bounds.width - width) / 2;
- y = (bounds.height - renderer.FONT_HEIGHT) / 2;
+ x = (getBounds().width - width) / 2;
+ y = (getBounds().height - renderer.FONT_HEIGHT) / 2;
} else if (alignment == Alignment.LEFT) {
x = 0;
- y = (bounds.height - renderer.FONT_HEIGHT) / 2;
+ y = (getBounds().height - renderer.FONT_HEIGHT) / 2;
} else if (alignment == Alignment.RIGHT) {
- x = bounds.width - width;
- y = (bounds.height - renderer.FONT_HEIGHT) / 2;
+ x = getBounds().width - width;
+ y = (getBounds().height - renderer.FONT_HEIGHT) / 2;
} else{
return;
}