aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java7
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java6
2 files changed, 13 insertions, 0 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 83f0700..f2c9540 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
@@ -18,6 +18,7 @@ import io.github.cottonmc.cotton.gui.impl.client.LibGuiConfig;
import io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment;
import io.github.cottonmc.cotton.gui.widget.data.InputResult;
import io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment;
+import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;
/**
@@ -45,7 +46,10 @@ public class WLabel extends WWidget {
*
* @param text the text of the label
* @param color the color of the label
+ * @deprecated Use {@link #WLabel(Text, int)} instead.
*/
+ @Deprecated(forRemoval = true, since = "5.4.0")
+ @ApiStatus.ScheduledForRemoval(inVersion = "6.0.0")
public WLabel(String text, int color) {
this(new LiteralText(text), color);
}
@@ -66,7 +70,10 @@ public class WLabel extends WWidget {
* Constructs a new label with the {@linkplain #DEFAULT_TEXT_COLOR default text color}.
*
* @param text the text of the label
+ * @deprecated Use {@link #WLabel(Text)} instead.
*/
+ @Deprecated(forRemoval = true, since = "5.4.0")
+ @ApiStatus.ScheduledForRemoval(inVersion = "6.0.0")
public WLabel(String text) {
this(text, DEFAULT_TEXT_COLOR);
}
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 64bf367..6251c2e 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
@@ -26,6 +26,7 @@ import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
import io.github.cottonmc.cotton.gui.client.ScreenDrawing;
import io.github.cottonmc.cotton.gui.impl.client.NarrationMessages;
import io.github.cottonmc.cotton.gui.widget.data.InputResult;
+import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;
import org.lwjgl.glfw.GLFW;
@@ -312,6 +313,11 @@ public class WTextField extends WWidget {
return suggestion;
}
+ /**
+ * @deprecated Use {@link #setSuggestion(Text)} instead.
+ */
+ @Deprecated(forRemoval = true, since = "5.4.0")
+ @ApiStatus.ScheduledForRemoval(inVersion = "6.0.0")
public WTextField setSuggestion(@Nullable String suggestion) {
this.suggestion = suggestion != null ? new LiteralText(suggestion) : null;
return this;