More General scaling

Font Scaling.
Hit Error Bar scaling.
This commit is contained in:
fd
2015-03-12 21:34:37 -04:00
parent 65c50771ac
commit 0b16f0e157
3 changed files with 52 additions and 177 deletions

View File

@@ -154,16 +154,10 @@ public class Utils {
ErrorHandler.error("Failed to set the cursor.", e, true);
}
GameImage.init(width, height);
// create fonts
float fontBase;
if (height <= 600)
fontBase = 10f;
else if (height < 800)
fontBase = 11f;
else if (height <= 900)
fontBase = 13f;
else
fontBase = 15f;
float fontBase = 12f * GameImage.getUIscale();
try {
Font javaFont = Font.createFont(Font.TRUETYPE_FONT, ResourceLoader.getResourceAsStream(Options.FONT_NAME));
@@ -186,7 +180,6 @@ public class Utils {
}
// initialize game images
GameImage.init(width, height);
for (GameImage img : GameImage.values()) {
if (img.isPreload())
img.setDefaultImage();