diff options
Diffstat (limited to 'core/src/ch/asynk/gdx')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/ui/Assembly.java | 11 | ||||
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/ui/Root.java | 1 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/ui/Assembly.java b/core/src/ch/asynk/gdx/boardgame/ui/Assembly.java index 7cc92b8..8925032 100644 --- a/core/src/ch/asynk/gdx/boardgame/ui/Assembly.java +++ b/core/src/ch/asynk/gdx/boardgame/ui/Assembly.java @@ -29,6 +29,11 @@ public abstract class Assembly extends Element } } + public void taintChildren() + { + children.forEach( c -> c.taint() ); + } + public Element touched() { return touched; @@ -45,12 +50,6 @@ public abstract class Assembly extends Element return false; } - @Override public void taint() - { - tainted = true; - children.forEach( c -> c.taint() ); - } - @Override public void draw(Batch batch) { if (tainted) computeGeometry(); diff --git a/core/src/ch/asynk/gdx/boardgame/ui/Root.java b/core/src/ch/asynk/gdx/boardgame/ui/Root.java index 2353c41..3243b37 100644 --- a/core/src/ch/asynk/gdx/boardgame/ui/Root.java +++ b/core/src/ch/asynk/gdx/boardgame/ui/Root.java @@ -24,5 +24,6 @@ public class Root extends Assembly { setPosition(x, y, width, height); taint(); + taintChildren(); } } |