summaryrefslogtreecommitdiff
path: root/src/defaults.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-01 21:46:34 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-01 21:46:34 +0300
commitf466978d005e3a0e3148f304b075c6a9d9a2760b (patch)
tree00638e7409909197ffecabff9972f01ca5bee5d0 /src/defaults.cpp
parent1fc47e1877e156fa101ac80edc701d3a90059916 (diff)
downloadmanaverse-f466978d005e3a0e3148f304b075c6a9d9a2760b.tar.gz
manaverse-f466978d005e3a0e3148f304b075c6a9d9a2760b.tar.bz2
manaverse-f466978d005e3a0e3148f304b075c6a9d9a2760b.tar.xz
manaverse-f466978d005e3a0e3148f304b075c6a9d9a2760b.zip
use different default font sizes depend on screen density.
Diffstat (limited to 'src/defaults.cpp')
-rw-r--r--src/defaults.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 1995d1ee6..6105e81d2 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -157,7 +157,6 @@ DefaultsData* getConfigDefaults()
AddDEF("showownname", true);
AddDEF("showpickupparticle", true);
AddDEF("showpickupchat", true);
- AddDEF("fontSize", 12);
AddDEF("ReturnToggles", false);
AddDEF("ScrollLaziness", 16);
AddDEF("ScrollRadius", 0);
@@ -282,7 +281,6 @@ DefaultsData* getConfigDefaults()
AddDEF("hideErased", false);
AddDEF("enableDelayedAnimations", true);
AddDEF("enableCompoundSpriteDelay", true);
- AddDEF("npcfontSize", 13);
AddDEF("useAtlases", true);
AddDEF("useTextureSampler", false);
AddDEF("ministatussaved", 0);
@@ -333,6 +331,24 @@ void getConfigDefaults2(DefaultsData *const configData)
AddDEF("screenButtonsSize", 1);
AddDEF("screenJoystickSize", 1);
}
+ const int density = graphicsManager.getDensity();
+ int size = 12;
+ switch (density)
+ {
+ case DENSITY_HIGH:
+ size = 13;
+ break;
+ case DENSITY_XHIGH:
+ size = 15;
+ break;
+ case DENSITY_XXHIGH:
+ size = 17;
+ break;
+ default:
+ break;
+ }
+ AddDEF("fontSize", size);
+ AddDEF("npcfontSize", size + 1);
}
DefaultsData* getBrandingDefaults()