blob: 9cd4f56a2b81366080658a77b5df6aa1651bc040 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package ch.asynk.gdx.boardgame.ui;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.NinePatch;
public class Patch extends Element
{
private NinePatch patch;
public Patch(NinePatch patch)
{
super();
this.patch = patch;
setPosition(0, 0, patch.getTotalWidth(), patch.getTotalHeight());
}
@Override public void drawReal(Batch batch)
{
patch.draw(batch, getX(), getY(), getWidth(), getHeight());
}
}
|