From c4053722222805a2b134c704e50100fd36f8bf64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 16 Dec 2019 14:55:42 +0100 Subject: ui.Element : taintParent goes public --- core/src/ch/asynk/gdx/boardgame/ui/Element.java | 9 +++++++-- 1 file 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; } -- cgit v1.1-2-g2b99