diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-05-09 14:30:34 +0300 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-05-09 14:30:34 +0300 |
commit | cc0e892fcdb8d6e536801717cae60c2fe5b1ccd5 (patch) | |
tree | c49093621aa0dbbf959eb1c4d84772627aaf7162 /src/main/java/io | |
parent | 64398d682a207aeb15009168746ee4c9861b5587 (diff) | |
download | LibGui-cc0e892fcdb8d6e536801717cae60c2fe5b1ccd5.tar.gz LibGui-cc0e892fcdb8d6e536801717cae60c2fe5b1ccd5.tar.bz2 LibGui-cc0e892fcdb8d6e536801717cae60c2fe5b1ccd5.zip |
Simplify getTextAt
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java | 2 | ||||
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java index d6d02d3..67bd55a 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java @@ -103,7 +103,7 @@ public class WLabel extends WWidget { @Nullable public Text getTextAt(int x, int y) { if (isWithinBounds(x, y)) { - return MinecraftClient.getInstance().textRenderer.getTextHandler().trimToWidth(text, x); + return MinecraftClient.getInstance().textRenderer.trimToWidth(text, x); } return null; } diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java index ccc3e83..2d3a5ec 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java @@ -65,7 +65,7 @@ public class WText extends WWidget { if (lineIndex >= 0 && lineIndex < wrappedLines.size()) { Text line = wrappedLines.get(lineIndex); - return font.getTextHandler().trimToWidth(line, x); + return font.trimToWidth(line, x); } return null; |