From 4a7b1cc6ab24d014320ebc7b8f0f21d82357e043 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') 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