diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2019-12-28 13:42:47 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2019-12-28 13:42:47 +0100 |
commit | bf352104bd040992cbcc52a7d311cbbbe401718c (patch) | |
tree | c21b8ff8eb87750626b4da46266754482a948ecb /core/src/ch | |
parent | 9cc4698459e0946e4db040cca57e1e3c46dc8f30 (diff) | |
download | gdx-boardgame-bf352104bd040992cbcc52a7d311cbbbe401718c.zip gdx-boardgame-bf352104bd040992cbcc52a7d311cbbbe401718c.tar.gz |
ui : draw() code cleanup
Diffstat (limited to 'core/src/ch')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/ui/List.java | 1 | ||||
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/ui/Root.java | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/ui/List.java b/core/src/ch/asynk/gdx/boardgame/ui/List.java index 3ed5985..3e050a6 100644 --- a/core/src/ch/asynk/gdx/boardgame/ui/List.java +++ b/core/src/ch/asynk/gdx/boardgame/ui/List.java @@ -94,7 +94,6 @@ public class List extends Element @Override public void draw(Batch batch) { if (!visible) return; - if (tainted) computeGeometry(); float x = getInnerX(); float y = getInnerTop(); diff --git a/core/src/ch/asynk/gdx/boardgame/ui/Root.java b/core/src/ch/asynk/gdx/boardgame/ui/Root.java index 96ea218..c84287b 100644 --- a/core/src/ch/asynk/gdx/boardgame/ui/Root.java +++ b/core/src/ch/asynk/gdx/boardgame/ui/Root.java @@ -55,6 +55,7 @@ public class Root extends Element @Override public void draw(Batch batch) { + if (!visible) return; if (tainted) computeGeometry(); children.forEach( c -> c.draw(batch) ); } |