aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WCardPanel.java10
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java10
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WTabPanel.java4
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java9
4 files changed, 1 insertions, 32 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WCardPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WCardPanel.java
index 3d1da6a..8caad27 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WCardPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WCardPanel.java
@@ -178,16 +178,6 @@ public class WCardPanel extends WPanel {
card.validate(c);
if (getSelectedCard() != card) card.onHidden();
}
-
- if (c != null) createPeers(c);
- }
-
- @SuppressWarnings("deprecation")
- @Override
- public void createPeers(GuiDescription c) {
- for (WWidget card : cards) {
- card.createPeers(c);
- }
}
@Environment(EnvType.CLIENT)
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java
index 90ef5d6..2576d46 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPanel.java
@@ -26,15 +26,6 @@ public abstract class WPanel extends WWidget {
@Environment(EnvType.CLIENT)
private BackgroundPainter backgroundPainter = null;
- @SuppressWarnings("deprecation")
- @Override
- public void createPeers(GuiDescription c) {
- super.createPeers(c);
- for(WWidget child : children) {
- child.createPeers(c);
- }
- }
-
/**
* Removes the widget from this panel.
*
@@ -188,7 +179,6 @@ public abstract class WPanel extends WWidget {
for (WWidget child : children) {
child.validate(c);
}
- if (c!=null) createPeers(c);
}
@Environment(EnvType.CLIENT)
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTabPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTabPanel.java
index efb71d5..9e17d37 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTabPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTabPanel.java
@@ -120,10 +120,8 @@ public class WTabPanel extends WPanel {
* @param tooltip the tab tooltip
* @throws IllegalArgumentException if both the title and the icon are null
* @throws NullPointerException if the widget is null
- * @deprecated Use {@link Builder} instead.
*/
- @Deprecated
- public Tab(@Nullable Text title, @Nullable Icon icon, WWidget widget, @Nullable Consumer<TooltipBuilder> tooltip) {
+ private Tab(@Nullable Text title, @Nullable Icon icon, WWidget widget, @Nullable Consumer<TooltipBuilder> tooltip) {
if (title == null && icon == null) {
throw new IllegalArgumentException("A tab must have a title or an icon");
}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java
index 98b87b6..a77bd5e 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java
@@ -305,15 +305,6 @@ public class WWidget {
}
/**
- * Creates "heavyweight" component peers
- * @param c the top-level Container that will hold the peers
- * @deprecated All widget peers should be added in {@link #validate(GuiDescription)}.
- */
- @Deprecated
- public void createPeers(GuiDescription c) {
- }
-
- /**
* Paints this widget.
*
* @param matrices the rendering matrix stack