summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-11-09 22:31:35 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-11-09 22:31:35 +0100
commitfefd2fd365a5e2d8af629f5fa807c1d59ce08af5 (patch)
tree7dfdd88690b362d8781c8d579e7c189c8306d73d /core/src/ch/asynk/rustanddust
parent8f4b73804f0958c020f6304795ffea916a907028 (diff)
downloadRustAndDust-fefd2fd365a5e2d8af629f5fa807c1d59ce08af5.zip
RustAndDust-fefd2fd365a5e2d8af629f5fa807c1d59ce08af5.tar.gz
RustAndDust: call UnitDock/Bg.setScale
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/RustAndDust.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/RustAndDust.java b/core/src/ch/asynk/rustanddust/RustAndDust.java
index aed90cc..819e1d2 100644
--- a/core/src/ch/asynk/rustanddust/RustAndDust.java
+++ b/core/src/ch/asynk/rustanddust/RustAndDust.java
@@ -16,6 +16,8 @@ import ch.asynk.rustanddust.screens.GameScreen;
import ch.asynk.rustanddust.game.Ctrl;
import ch.asynk.rustanddust.game.Config;
import ch.asynk.rustanddust.game.battles.Factory;
+import ch.asynk.rustanddust.ui.Bg;
+import ch.asynk.rustanddust.game.hud.UnitDock;
public class RustAndDust extends Game
{
@@ -151,11 +153,16 @@ public class RustAndDust extends Game
uiAtlas = manager.get("data/ui.atlas", TextureAtlas.class);
FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("skin/veteran-typewriter.ttf"));
FreeTypeFontParameter parameter = new FreeTypeFontParameter();
- parameter.size = Math.max((int) (Gdx.graphics.getHeight() * 0.04f), 15);
+
+ float h = Gdx.graphics.getHeight();
+ parameter.size = Math.max((int) (h * 0.04f), 15);
parameter.color = Color.BLACK;
fontB = generator.generateFont(parameter);
parameter.color = Color.WHITE;
fontW = generator.generateFont(parameter);
+
+ UnitDock.setScale(Math.max((h * 0.0005f), 0.4f));
+ Bg.setScale(Math.max((h * 0.00125f), 0.4f));
}
private void unloadUiAssets()