From 8b44fc8a5a178c16641cecdbb5a6fd0f8e434fcd Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Mon, 23 May 2022 12:18:33 +0300 Subject: Fix WBox always resizing children and calling wrong canResize Fixes #162. --- src/main/java/io/github/cottonmc/cotton/gui/widget/WBox.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WBox.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WBox.java index 637ee56..5452b93 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WBox.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WBox.java @@ -58,7 +58,7 @@ public class WBox extends WPanelWithInsets { public void add(WWidget widget, int width, int height) { widget.setParent(this); children.add(widget); - if (canResize()) { + if (widget.canResize()) { widget.setSize(width, height); } } -- cgit