diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-07-19 13:20:33 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-07-19 13:20:33 +0200 |
commit | de0463bcf0f76ef8b07f2719679c9e0d72745c5d (patch) | |
tree | 9a33df947ceeea16a3e20b400585b1d3c304e77e /core/src/ch/asynk/rustanddust/ui/Bg.java | |
parent | e66f9f2a61d3dab4545e996046486de0d44e2901 (diff) | |
download | RustAndDust-de0463bcf0f76ef8b07f2719679c9e0d72745c5d.zip RustAndDust-de0463bcf0f76ef8b07f2719679c9e0d72745c5d.tar.gz |
welcome RustAndDust
Diffstat (limited to 'core/src/ch/asynk/rustanddust/ui/Bg.java')
-rw-r--r-- | core/src/ch/asynk/rustanddust/ui/Bg.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/Bg.java b/core/src/ch/asynk/rustanddust/ui/Bg.java new file mode 100644 index 0000000..cac3ddc --- /dev/null +++ b/core/src/ch/asynk/rustanddust/ui/Bg.java @@ -0,0 +1,28 @@ +package ch.asynk.rustanddust.ui; + +import com.badlogic.gdx.graphics.g2d.Batch; +import com.badlogic.gdx.graphics.g2d.TextureRegion; + +public class Bg extends Widget +{ + private TextureRegion region; + + public Bg(TextureRegion region) + { + super(); + this.region = region; + setPosition(0, 0, region.getRegionWidth(), region.getRegionHeight()); + } + + @Override + public void dispose() + { + } + + @Override + public void draw(Batch batch) + { + if (!visible) return; + batch.draw(region, rect.x, rect.y, rect.width, rect.height); + } +} |