Use floating point value for font scale
This commit is contained in:
parent
da4ac0a976
commit
4883e4a585
@ -643,9 +643,9 @@ namespace UserConfigParams
|
||||
PARAM_DEFAULT(BoolUserConfigParam(false, "hq_mipmap",
|
||||
&m_video_group, "Generate mipmap for textures using "
|
||||
"high quality method with SSE"));
|
||||
PARAM_PREFIX IntUserConfigParam m_fonts_size
|
||||
PARAM_DEFAULT( IntUserConfigParam(2, "fonts_size",
|
||||
&m_video_group,"The size of fonts. 0 is the smallest and 4 is the biggest") );
|
||||
PARAM_PREFIX FloatUserConfigParam m_fonts_size
|
||||
PARAM_DEFAULT( FloatUserConfigParam(2, "fonts_size",
|
||||
&m_video_group,"The size of fonts. 0 is the smallest and 6 is the biggest") );
|
||||
|
||||
// ---- Recording
|
||||
PARAM_PREFIX GroupUserConfigParam m_recording_group
|
||||
|
@ -354,9 +354,16 @@ void FontWithFace::setDPI()
|
||||
irr_driver->getActualScreenSize().Width) / 720.0f;
|
||||
int factorTwo = getScalingFactorTwo();
|
||||
|
||||
if(0 <= UserConfigParams::m_fonts_size && UserConfigParams::m_fonts_size <= 4)
|
||||
factorTwo += UserConfigParams::m_fonts_size * 5 - 10;
|
||||
if (UserConfigParams::m_fonts_size < 0)
|
||||
{
|
||||
UserConfigParams::m_fonts_size = 0;
|
||||
}
|
||||
else if (UserConfigParams::m_fonts_size > 6)
|
||||
{
|
||||
UserConfigParams::m_fonts_size = 6;
|
||||
}
|
||||
|
||||
factorTwo += UserConfigParams::m_fonts_size * 5 - 10;
|
||||
m_face_dpi = int(factorTwo * getScalingFactorOne() * scale);
|
||||
|
||||
} // setDPI
|
||||
|
@ -69,7 +69,7 @@ void override_default_params()
|
||||
UserConfigParams::m_screen_keyboard = 1;
|
||||
|
||||
// Set bigger fonts and buttons
|
||||
UserConfigParams::m_fonts_size = 4;
|
||||
UserConfigParams::m_fonts_size = 4.5f;
|
||||
|
||||
// It shouldn't matter, but STK is always run in fullscreen on android
|
||||
UserConfigParams::m_fullscreen = true;
|
||||
|
Loading…
Reference in New Issue
Block a user