aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java11
1 files changed, 11 insertions, 0 deletions
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 656f24f..f06356f 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
@@ -131,6 +131,17 @@ public class WWidget {
}
/**
+ * Gets the parent panel of this widget.
+ *
+ * @return the parent, or null if this widget has no parent
+ * @since 2.0.0
+ */
+ @Nullable
+ public WPanel getParent() {
+ return parent;
+ }
+
+ /**
* Sets the parent panel of this widget.
*
* @param parent the new parent