blob: 7a87c268c51f66bb1f7a900ed76e92e9d62ff8f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package ch.asynk.tankontank.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);
}
}
|