aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2021-06-09 11:24:30 +0300
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2021-06-09 11:24:30 +0300
commit48bdcca98a8d28208b452b030e08cc8e23fa8aed (patch)
tree419e947d46adb9fa05660924cb2ea72d8f4318bc /src/main/java/io
parentf15d6c10ff057d906e138a4e3c199a9a90c3a92a (diff)
downloadLibGui-48bdcca98a8d28208b452b030e08cc8e23fa8aed.tar.gz
LibGui-48bdcca98a8d28208b452b030e08cc8e23fa8aed.tar.bz2
LibGui-48bdcca98a8d28208b452b030e08cc8e23fa8aed.zip
Remove WWidget.createPeers
Closes #117.
Diffstat (limited to 'src/main/java/io')
-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/WWidget.java13
3 files changed, 2 insertions, 31 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 f5ff75a..227376b 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
@@ -27,15 +27,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.
*
@@ -136,7 +127,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/WWidget.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java
index 1091201..cd3fb68 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
@@ -341,8 +332,8 @@ public class WWidget {
}
/**
- * Internal method to render tooltip data. This requires an overriden {@link #addTooltip(TooltipBuilder)
- * addTooltip} method to insert data into the tooltip - without this, the method returns early, because no work
+ * Internal method to render tooltip data. This requires an overridden {@link #addTooltip(TooltipBuilder)
+ * addTooltip} method to insert data into the tooltip - without this, the method returns early because of no work.
*
* @param x the X coordinate of this widget on screen
* @param y the Y coordinate of this widget on screen