summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/gdx/tabletop/ui/Assembly.java1
-rw-r--r--core/src/ch/asynk/gdx/tabletop/ui/Root.java7
2 files changed, 7 insertions, 1 deletions
diff --git a/core/src/ch/asynk/gdx/tabletop/ui/Assembly.java b/core/src/ch/asynk/gdx/tabletop/ui/Assembly.java
index 9facd26..e808e50 100644
--- a/core/src/ch/asynk/gdx/tabletop/ui/Assembly.java
+++ b/core/src/ch/asynk/gdx/tabletop/ui/Assembly.java
@@ -52,6 +52,7 @@ public abstract class Assembly extends Element
@Override public void draw(Batch batch)
{
+ if (tainted) computeGeometry();
children.forEach( c -> c.draw(batch) );
}
diff --git a/core/src/ch/asynk/gdx/tabletop/ui/Root.java b/core/src/ch/asynk/gdx/tabletop/ui/Root.java
index 99d63cf..f887f32 100644
--- a/core/src/ch/asynk/gdx/tabletop/ui/Root.java
+++ b/core/src/ch/asynk/gdx/tabletop/ui/Root.java
@@ -10,7 +10,12 @@ public class Root extends Assembly
public void resize(float width, float height)
{
- setPosition(0, 0, width, height);
+ resize(getX(), getY(), width, height);
+ }
+
+ public void resize(float x, float y, float width, float height)
+ {
+ setPosition(x, y, width, height);
taint();
}
}