diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-10 16:45:27 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-10 16:45:27 +0100 |
commit | e76057bd13309744d752ff69d7a57f31165b5555 (patch) | |
tree | d9100fa0f08812e37f739c8baa9abac402bfdf85 /core/src/ch/asynk/tankontank | |
parent | a447fa0e696b450a2da10daa7c3aa2dfee2112ef (diff) | |
download | RustAndDust-e76057bd13309744d752ff69d7a57f31165b5555.zip RustAndDust-e76057bd13309744d752ff69d7a57f31165b5555.tar.gz |
Hud: load font black and white
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hud.java | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java index 42725cd..885b98e 100644 --- a/core/src/ch/asynk/tankontank/game/Hud.java +++ b/core/src/ch/asynk/tankontank/game/Hud.java @@ -33,7 +33,8 @@ public class Hud implements Disposable, Animation private final Ctrl ctrl; private Object hit; - private BitmapFont font; + private BitmapFont fontB; + private BitmapFont fontW; public PlayerInfo playerInfo; public ActionButtons actionButtons; @@ -50,20 +51,22 @@ public class Hud implements Disposable, Animation this.ctrl = ctrl; TextureAtlas atlas = game.factory.hudAtlas; - font = new BitmapFont(Gdx.files.internal("skin/veteran.fnt"), atlas.findRegion("veteran-white")); - playerInfo = new PlayerInfo(ctrl, font, atlas, 5f); + fontB = new BitmapFont(Gdx.files.internal("skin/veteran.fnt"), atlas.findRegion("veteran-black")); + fontW = new BitmapFont(Gdx.files.internal("skin/veteran.fnt"), atlas.findRegion("veteran-white")); + playerInfo = new PlayerInfo(ctrl, fontW, atlas, 5f); actionButtons = new ActionButtons(ctrl, atlas, 5f); actionButtons.hide(); - msg = new Msg(font, atlas, 10f); - okCancel = new OkCancel(font, atlas, 10f); - stats = new Statistics(font, atlas, 10f); - engagement = new Engagement(font, atlas); + msg = new Msg(fontW, atlas, 10f); + okCancel = new OkCancel(fontW, atlas, 10f); + stats = new Statistics(fontW, atlas, 10f); + engagement = new Engagement(fontB, atlas); } @Override public void dispose() { - font.dispose(); + fontB.dispose(); + fontW.dispose(); playerInfo.dispose(); actionButtons.dispose(); msg.dispose(); @@ -92,7 +95,7 @@ public class Hud implements Disposable, Animation { draw(batch); if (debug) - font.draw(batch, String.format("FPS: %d", Gdx.graphics.getFramesPerSecond()), 80, 25); + fontB.draw(batch, String.format("FPS: %d", Gdx.graphics.getFramesPerSecond()), 80, 25); } @Override |