summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/ui
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/rustanddust/ui')
-rw-r--r--core/src/ch/asynk/rustanddust/ui/Bg.java2
-rw-r--r--core/src/ch/asynk/rustanddust/ui/LabelImage.java7
2 files changed, 8 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/Bg.java b/core/src/ch/asynk/rustanddust/ui/Bg.java
index 72fdd2a..081ff93 100644
--- a/core/src/ch/asynk/rustanddust/ui/Bg.java
+++ b/core/src/ch/asynk/rustanddust/ui/Bg.java
@@ -12,7 +12,7 @@ public class Bg extends Widget
{
super();
this.region = region;
- setPosition(0, 0, region.getRegionWidth() * SCALE, region.getRegionHeight() * SCALE);
+ rect.set(0, 0, region.getRegionWidth() * SCALE, region.getRegionHeight() * SCALE);
}
public static void setScale(float scale)
diff --git a/core/src/ch/asynk/rustanddust/ui/LabelImage.java b/core/src/ch/asynk/rustanddust/ui/LabelImage.java
index eb26f7f..afbaa25 100644
--- a/core/src/ch/asynk/rustanddust/ui/LabelImage.java
+++ b/core/src/ch/asynk/rustanddust/ui/LabelImage.java
@@ -46,6 +46,13 @@ public class LabelImage extends Bg
label.update();
}
+ @Override
+ public void setPosition(float x, float y, float w, float h)
+ {
+ rect.set(x, y, w, h);
+ label.update();
+ }
+
public void setLabelPosition(Position position)
{
label.setPosition(position, this);