summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-11-09 22:30:43 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-11-09 22:30:43 +0100
commitf041e267040ee6c777df95829eb5558e47af9ef2 (patch)
tree3bace817632c765234546dcd95a9e44433fb76be
parent05b020fd6e100e80291412bfcd1fc9a8555e565f (diff)
downloadRustAndDust-f041e267040ee6c777df95829eb5558e47af9ef2.zip
RustAndDust-f041e267040ee6c777df95829eb5558e47af9ef2.tar.gz
Bg: add setScale(float)
-rw-r--r--core/src/ch/asynk/rustanddust/ui/Bg.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/Bg.java b/core/src/ch/asynk/rustanddust/ui/Bg.java
index cac3ddc..72fdd2a 100644
--- a/core/src/ch/asynk/rustanddust/ui/Bg.java
+++ b/core/src/ch/asynk/rustanddust/ui/Bg.java
@@ -5,13 +5,19 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion;
public class Bg extends Widget
{
+ private static float SCALE = 1.0f;
private TextureRegion region;
public Bg(TextureRegion region)
{
super();
this.region = region;
- setPosition(0, 0, region.getRegionWidth(), region.getRegionHeight());
+ setPosition(0, 0, region.getRegionWidth() * SCALE, region.getRegionHeight() * SCALE);
+ }
+
+ public static void setScale(float scale)
+ {
+ SCALE = scale;
}
@Override