aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2020-05-20 23:36:05 +0300
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2020-05-20 23:36:05 +0300
commit3a9ba08af978d0cfde78713f46bf5622e1028038 (patch)
treeb06fa1cb32369e16de51a62d44e73bcfc1062534 /src/main
parent9611a06a3e312855ae38eedf30bfdfecfb3598d8 (diff)
downloadLibGui-3a9ba08af978d0cfde78713f46bf5622e1028038.tar.gz
LibGui-3a9ba08af978d0cfde78713f46bf5622e1028038.tar.bz2
LibGui-3a9ba08af978d0cfde78713f46bf5622e1028038.zip
Add WWidget.getParent
Diffstat (limited to 'src/main')
-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