aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisXander <xandersmith2008@gmail.com>2023-06-05 16:43:32 +0100
committerisXander <xandersmith2008@gmail.com>2023-06-05 16:43:32 +0100
commite5bb02b4415975464d91a3d13f83a58cb8b7ad80 (patch)
tree8077cb17d6c0ee5ab66922d91705296b9e1d9779
parentbced83f791fe6ad0d30486faf50ed42bf3daf12a (diff)
downloadYetAnotherConfigLib-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.java2
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()) {