Minor follow-up to #48.

Created some more variables for readability.

Removed some unnecessary casts.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-03-12 23:53:25 -04:00
parent 466312bc45
commit 35b1bf197f
5 changed files with 43 additions and 51 deletions

View File

@@ -140,11 +140,11 @@ public class Utils {
container.setAlwaysRender(true);
container.setUpdateOnlyWhenVisible(false);
// calculate UI scale
GameImage.init(width, height);
// create fonts
float fontBase = 12f * GameImage.getUIscale();
try {
Font javaFont = Font.createFont(Font.TRUETYPE_FONT, ResourceLoader.getResourceAsStream(Options.FONT_NAME));
Font font = javaFont.deriveFont(Font.PLAIN, (int) (fontBase * 4 / 3));