diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-06-19 03:34:11 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2022-06-19 03:34:11 +0800 |
| commit | 809352586e24ded73cf06f7760c0b0933338515d (patch) | |
| tree | 35f35f08b2417d4e550361e9d8a4ae0778de5afb /runtime/src | |
| parent | 0113979945feb54c5f23218fe5cb1283e9f47d4b (diff) | |
| download | RoughlyEnoughItems-809352586e24ded73cf06f7760c0b0933338515d.tar.gz RoughlyEnoughItems-809352586e24ded73cf06f7760c0b0933338515d.tar.bz2 RoughlyEnoughItems-809352586e24ded73cf06f7760c0b0933338515d.zip | |
Make scale indicator show on top
Diffstat (limited to 'runtime/src')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/entrylist/EntryListWidget.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/entrylist/EntryListWidget.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/entrylist/EntryListWidget.java index ad6b38e4b..b9f7b1e26 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/entrylist/EntryListWidget.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/widget/entrylist/EntryListWidget.java @@ -233,12 +233,15 @@ public abstract class EntryListWidget extends WidgetWithBounds implements Overla scaleIndicator.update(delta); if (scaleIndicator.value() > 0.04) { + matrices.pushPose(); + matrices.translate(0, 0, 500); TextComponent component = new TextComponent(Math.round(ConfigObject.getInstance().getEntrySize() * 100) + "%"); int width = font.width(component); int backgroundColor = ((int) Math.round(0xa0 * Mth.clamp(scaleIndicator.value(), 0.0, 1.0))) << 24; int textColor = ((int) Math.round(0xdd * Mth.clamp(scaleIndicator.value(), 0.0, 1.0))) << 24; fillGradient(matrices, bounds.getCenterX() - width / 2 - 2, bounds.getCenterY() - 6, bounds.getCenterX() + width / 2 + 2, bounds.getCenterY() + 6, backgroundColor, backgroundColor); font.draw(matrices, component, bounds.getCenterX() - width / 2, bounds.getCenterY() - 4, 0xFFFFFF | textColor); + matrices.popPose(); } } |
