diff --git a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Widget.java b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Widget.java index e1610de5198..9255d3108da 100644 --- a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Widget.java +++ b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Widget.java @@ -76,6 +76,10 @@ public void validate () { layout(); } + public boolean needsLayout () { + return needsLayout; + } + public void invalidateHierarchy () { invalidate(); if (parent instanceof Layout) ((Layout)parent).invalidateHierarchy(); diff --git a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/WidgetGroup.java b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/WidgetGroup.java index e03a7e0ee86..ae460dc0ff8 100644 --- a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/WidgetGroup.java +++ b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/WidgetGroup.java @@ -43,11 +43,15 @@ public void validate () { needsLayout = false; } + public boolean needsLayout () { + return needsLayout; + } + public void invalidateHierarchy () { invalidate(); if (parent instanceof Layout) ((Layout)parent).invalidateHierarchy(); } - + protected void childrenChanged () { invalidateHierarchy(); }