diff options
author | isXander <xandersmith2008@gmail.com> | 2023-06-05 16:43:32 +0100 |
---|---|---|
committer | isXander <xandersmith2008@gmail.com> | 2023-06-05 16:43:32 +0100 |
commit | e5bb02b4415975464d91a3d13f83a58cb8b7ad80 (patch) | |
tree | 8077cb17d6c0ee5ab66922d91705296b9e1d9779 | |
parent | bced83f791fe6ad0d30486faf50ed42bf3daf12a (diff) | |
download | YetAnotherConfigLib-e5bb02b4415975464d91a3d13f83a58cb8b7ad80.tar.gz YetAnotherConfigLib-e5bb02b4415975464d91a3d13f83a58cb8b7ad80.tar.bz2 YetAnotherConfigLib-e5bb02b4415975464d91a3d13f83a58cb8b7ad80.zip |
Fix string controllers not rendering
-rw-r--r-- | common/src/main/java/dev/isxander/yacl3/gui/controllers/string/StringControllerElement.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/StringControllerElement.java b/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/StringControllerElement.java index a889a77..86cc7bd 100644 --- a/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/StringControllerElement.java +++ b/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/StringControllerElement.java @@ -50,7 +50,7 @@ public class StringControllerElement extends ControllerWidget<IStringController< if (!isHovered()) valueText = Component.literal(GuiUtils.shortenString(valueText.getString(), textRenderer, getMaxUnwrapLength(), "...")).setStyle(valueText.getStyle()); int textX = getDimension().xLimit() - textRenderer.width(valueText) + renderOffset - getXPadding(); - graphics.enableScissor(inputFieldBounds.x(), inputFieldBounds.y() - 2, inputFieldBounds.width() + 1, inputFieldBounds.height() + 4); + graphics.enableScissor(inputFieldBounds.x(), inputFieldBounds.y() - 2, inputFieldBounds.xLimit() + 1, inputFieldBounds.yLimit() + 4); graphics.drawString(textRenderer, valueText, textX, getTextY(), getValueColor(), true); if (isHovered()) { |