From dac53cc930b2d3b97262ae451598d1929fc99c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 17 Dec 2019 14:42:21 +0100 Subject: Assembly : taint() -> taintChildren() --- core/src/ch/asynk/gdx/boardgame/ui/Assembly.java | 11 +++++------ 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(); } } -- cgit v1.1-2-g2b99