diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-01-17 14:31:30 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-01-17 14:31:30 +0800 |
| commit | 7a1cf35934ef14c04f884fe6ae34282e1d6243ba (patch) | |
| tree | e84d0c5bfb9929f065544e96ecc1fb07d3496c29 /src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java | |
| parent | b4be45e414504afb49910d766bebcd00f55b052b (diff) | |
| download | RoughlyEnoughItems-7a1cf35934ef14c04f884fe6ae34282e1d6243ba.tar.gz RoughlyEnoughItems-7a1cf35934ef14c04f884fe6ae34282e1d6243ba.tar.bz2 RoughlyEnoughItems-7a1cf35934ef14c04f884fe6ae34282e1d6243ba.zip | |
3.3.12
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java index bd9acb417..68f2fe873 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/LabelWidget.java @@ -9,6 +9,7 @@ import me.shedaniel.math.api.Point; import me.shedaniel.math.api.Rectangle; import me.shedaniel.rei.impl.ScreenHelper; import net.minecraft.client.gui.Element; +import org.jetbrains.annotations.ApiStatus; import java.util.Collections; import java.util.List; @@ -25,12 +26,12 @@ public class LabelWidget extends WidgetWithBounds { private boolean centered = true; private Supplier<String> tooltipSupplier; - @Deprecated + @ApiStatus.Internal public LabelWidget(int x, int y, String text) { this(new Point(x, y), text); } - @Deprecated + @ApiStatus.Internal public LabelWidget(Point point, String text) { this.pos = point; this.text = text; @@ -136,9 +137,9 @@ public class LabelWidget extends WidgetWithBounds { Point pos = getPosition(); if (isCentered()) { if (hasShadows) - font.drawWithShadow(text, pos.x - width / 2, pos.y, defaultColor); + font.drawWithShadow(text, pos.x - width / 2f, pos.y, defaultColor); else - font.draw(text, pos.x - width / 2, pos.y, defaultColor); + font.draw(text, pos.x - width / 2f, pos.y, defaultColor); } else { if (hasShadows) font.drawWithShadow(text, pos.x, pos.y, defaultColor); |
