aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2020-05-09 14:12:37 +0300
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2020-05-09 14:13:32 +0300
commit7f9699a1a4714b89abbd9f5567d753f6a7967aff (patch)
tree1ad5e70b639d672b1081d958a7fed309ad9a03fb
parente1809045a90f73c9c11f10982abec7d37e998360 (diff)
downloadLibGui-7f9699a1a4714b89abbd9f5567d753f6a7967aff.tar.gz
LibGui-7f9699a1a4714b89abbd9f5567d753f6a7967aff.tar.bz2
LibGui-7f9699a1a4714b89abbd9f5567d753f6a7967aff.zip
Make WLabel.getTextAt and WText.getTextAt public
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java2
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 3889ac2..e14239a 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
@@ -101,7 +101,7 @@ public class WLabel extends WWidget {
@Environment(EnvType.CLIENT)
@Nullable
- private Text getTextAt(int x, int y) {
+ public Text getTextAt(int x, int y) {
if (isWithinBounds(x, y)) {
return MinecraftClient.getInstance().textRenderer.method_27527().method_27489(text, x);
}
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 094817c..94bb080 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
@@ -59,7 +59,7 @@ public class WText extends WWidget {
@Environment(EnvType.CLIENT)
@Nullable
- protected Text getTextAt(int x, int y) {
+ public Text getTextAt(int x, int y) {
TextRenderer font = MinecraftClient.getInstance().textRenderer;
int lineIndex = y / font.fontHeight;