summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/gdx
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2019-12-28 13:42:47 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2019-12-28 13:42:47 +0100
commitbf352104bd040992cbcc52a7d311cbbbe401718c (patch)
treec21b8ff8eb87750626b4da46266754482a948ecb /core/src/ch/asynk/gdx
parent9cc4698459e0946e4db040cca57e1e3c46dc8f30 (diff)
downloadgdx-boardgame-bf352104bd040992cbcc52a7d311cbbbe401718c.zip
gdx-boardgame-bf352104bd040992cbcc52a7d311cbbbe401718c.tar.gz
ui : draw() code cleanup
Diffstat (limited to 'core/src/ch/asynk/gdx')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/ui/List.java1
-rw-r--r--core/src/ch/asynk/gdx/boardgame/ui/Root.java1
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) );
}