diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-05-21 00:17:06 +0300 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-05-21 00:17:06 +0300 |
commit | 6f8f85c5fd29021152ce6f8969e060fd6e3fbe83 (patch) | |
tree | 2c5342a9c3695d4582b71057a7cfcd143bf60a8f /src | |
parent | 628d4d791582dc3e57be887903d6d973df47b78f (diff) | |
download | LibGui-6f8f85c5fd29021152ce6f8969e060fd6e3fbe83.tar.gz LibGui-6f8f85c5fd29021152ce6f8969e060fd6e3fbe83.tar.bz2 LibGui-6f8f85c5fd29021152ce6f8969e060fd6e3fbe83.zip |
Add back WTextField.setSuggestion(String)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java index 0f4e1c9..191c609 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java @@ -11,6 +11,7 @@ import net.minecraft.client.render.BufferBuilder; import net.minecraft.client.render.Tessellator; import net.minecraft.client.render.VertexFormats; import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.text.LiteralText; import net.minecraft.text.Text; import net.minecraft.util.math.MathHelper; import org.lwjgl.glfw.GLFW; @@ -455,6 +456,11 @@ public class WTextField extends WWidget { return suggestion; } + public WTextField setSuggestion(@Nullable String suggestion) { + this.suggestion = suggestion != null ? new LiteralText(suggestion) : null; + return this; + } + public WTextField setSuggestion(@Nullable Text suggestion) { this.suggestion = suggestion; return this; |