From f041e267040ee6c777df95829eb5558e47af9ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 9 Nov 2015 22:30:43 +0100 Subject: Bg: add setScale(float) --- core/src/ch/asynk/rustanddust/ui/Bg.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.1-2-g2b99