diff options
Diffstat (limited to 'core/src/ch/asynk/gdx/boardgame/ui')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/ui/Element.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/ui/Element.java b/core/src/ch/asynk/gdx/boardgame/ui/Element.java index 63e2e29..615c345 100644 --- a/core/src/ch/asynk/gdx/boardgame/ui/Element.java +++ b/core/src/ch/asynk/gdx/boardgame/ui/Element.java @@ -18,10 +18,15 @@ public abstract class Element implements Drawable, Paddable, Positionable, Touch protected Rectangle rect; // outer drawing coordinates protected float x, y; // given position protected boolean tainted; // geometry must be computed - protected boolean taintParent; // propagate tainted state up the tree + public boolean taintParent; // propagate tainted state up the tree protected Element() { + this(false); + } + + protected Element(boolean taintParent) + { this.blocked = false; this.visible = true; this.padding = 0; @@ -30,7 +35,7 @@ public abstract class Element implements Drawable, Paddable, Positionable, Touch this.rect = new Rectangle(0, 0, 0, 0); this.x = this.y = 0; this.tainted = true; - this.taintParent= false; + this.taintParent = taintParent; } @Override public final float getX() { return rect.x; } |