From 3a9ba08af978d0cfde78713f46bf5622e1028038 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Wed, 20 May 2020 23:36:05 +0300 Subject: Add WWidget.getParent --- .../java/io/github/cottonmc/cotton/gui/widget/WWidget.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') 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 @@ -130,6 +130,17 @@ public class WWidget { return false; } + /** + * 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. * -- cgit