diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2019-12-17 14:42:21 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2019-12-17 14:42:21 +0100 |
commit | dac53cc930b2d3b97262ae451598d1929fc99c13 (patch) | |
tree | c47ddb2a7a05e34a951f55340e85d92bdc76a4a0 | |
parent | f2fef564a73139d31344b7a89856196d60a49ba2 (diff) | |
download | gdx-boardgame-dac53cc930b2d3b97262ae451598d1929fc99c13.zip gdx-boardgame-dac53cc930b2d3b97262ae451598d1929fc99c13.tar.gz |
Assembly : taint() -> taintChildren()
-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(); } } |