diff options
Diffstat (limited to 'common')
-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()) { |