Make minimap bigger for arenas on android

This commit is contained in:
Deve 2018-10-20 21:53:18 +02:00
parent 2ef3980009
commit dae5bb221f

View File

@ -110,11 +110,15 @@ RaceGUI::RaceGUI()
else
map_size_splitscreen = 0.5f;
}
World* world = World::getWorld();
assert(world != NULL);
// Originally m_map_height was 100, and we take 480 as minimum res
float scaling = irr_driver->getFrameSize().Height / 480.0f;
const float map_size = stk_config->m_minimap_size * map_size_splitscreen;
const float top_margin = 3.5f * m_font_height;
const float top_margin = world->raceHasLaps() ? 3.5f * m_font_height
: 1.8f * m_font_height;
if (UserConfigParams::m_multitouch_enabled &&
UserConfigParams::m_multitouch_mode != 0 &&
@ -541,9 +545,16 @@ void RaceGUI::drawGlobalMiniMap()
{
#ifndef SERVER_ONLY
//TODO : exception for some game modes ? Another option "Hidden in race, shown in battle ?"
if (UserConfigParams::m_minimap_display == 2 /*map hidden*/ ||
UserConfigParams::m_multitouch_scale > 1.3f)
if (UserConfigParams::m_minimap_display == 2) /*map hidden*/
return;
if (m_multitouch_gui != NULL)
{
float max_scale = World::getWorld()->raceHasLaps() ? 1.3f : 1.5f;
if (UserConfigParams::m_multitouch_scale > max_scale)
return;
}
// draw a map when arena has a navigation mesh.
Track *track = Track::getCurrentTrack();