summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/ui
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/rustanddust/ui')
-rw-r--r--core/src/ch/asynk/rustanddust/ui/Msg.java8
-rw-r--r--core/src/ch/asynk/rustanddust/ui/OkCancel.java11
2 files changed, 10 insertions, 9 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/Msg.java b/core/src/ch/asynk/rustanddust/ui/Msg.java
index e1e7c13..16c4e2d 100644
--- a/core/src/ch/asynk/rustanddust/ui/Msg.java
+++ b/core/src/ch/asynk/rustanddust/ui/Msg.java
@@ -2,17 +2,17 @@ package ch.asynk.rustanddust.ui;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
-import com.badlogic.gdx.graphics.g2d.TextureAtlas;
+import com.badlogic.gdx.graphics.g2d.NinePatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
public class Msg extends Patch
{
private LabelStack label;
- public Msg(BitmapFont font, TextureAtlas atlas)
+ public Msg(BitmapFont font, NinePatch patch, float fontSize)
{
- super(atlas.createPatch("typewriter"));
- label = new LabelStack(font, 20f);
+ super(patch);
+ label = new LabelStack(font, fontSize);
}
@Override
diff --git a/core/src/ch/asynk/rustanddust/ui/OkCancel.java b/core/src/ch/asynk/rustanddust/ui/OkCancel.java
index c064102..7b0bd1c 100644
--- a/core/src/ch/asynk/rustanddust/ui/OkCancel.java
+++ b/core/src/ch/asynk/rustanddust/ui/OkCancel.java
@@ -1,8 +1,9 @@
package ch.asynk.rustanddust.ui;
import com.badlogic.gdx.graphics.g2d.Batch;
+import com.badlogic.gdx.graphics.g2d.NinePatch;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
-import com.badlogic.gdx.graphics.g2d.TextureAtlas;
+import com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
public class OkCancel extends Patch
@@ -16,12 +17,12 @@ public class OkCancel extends Patch
protected Bg okBtn;
protected Bg cancelBtn;
- public OkCancel(BitmapFont font, TextureAtlas atlas)
+ public OkCancel(BitmapFont font, NinePatch patch, AtlasRegion okRegion, AtlasRegion cancelRegion)
{
- super(atlas.createPatch("typewriter"));
+ super(patch);
this.label = new Label(font);
- this.okBtn = new Bg(atlas.findRegion("ok"));
- this.cancelBtn = new Bg(atlas.findRegion("cancel"));
+ this.okBtn = new Bg(okRegion);
+ this.cancelBtn = new Bg(cancelRegion);
this.visible = false;
}