diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2019-12-16 14:55:42 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2019-12-16 14:55:42 +0100 |
commit | c4053722222805a2b134c704e50100fd36f8bf64 (patch) | |
tree | c43912a2202590c64ca44ab59a5a545c0d81035f /core/src/ch/asynk/gdx | |
parent | f1e45d6c366c8df1c5f0143f3f7353395d08d4ec (diff) | |
download | gdx-boardgame-c4053722222805a2b134c704e50100fd36f8bf64.zip gdx-boardgame-c4053722222805a2b134c704e50100fd36f8bf64.tar.gz |
ui.Element : taintParent goes public
Diffstat (limited to 'core/src/ch/asynk/gdx')
-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; } |