diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2022-04-25 13:03:35 +0300 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2022-04-25 13:03:35 +0300 |
commit | d72d94f483c897be54387b001425140b12e293ea (patch) | |
tree | f49cd14583a68a924c05983eb65cbeae966dd8d3 | |
parent | de17bc5a7f4328c0957e52f7d1d35a261bebf6e8 (diff) | |
download | LibGui-d72d94f483c897be54387b001425140b12e293ea.tar.gz LibGui-d72d94f483c897be54387b001425140b12e293ea.tar.bz2 LibGui-d72d94f483c897be54387b001425140b12e293ea.zip |
Backport deprecations from 6.0.0 beta 2
- WLabel(String) and WLabel(String, int)
- WTextField.setSuggestion(String)
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java | 7 | ||||
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java | 6 |
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; |