Use larger list for android in two more places
This commit is contained in:
parent
093f815d2c
commit
efd502c808
@ -19,6 +19,7 @@
|
|||||||
#include "states_screens/ghost_replay_selection.hpp"
|
#include "states_screens/ghost_replay_selection.hpp"
|
||||||
|
|
||||||
#include "config/player_manager.hpp"
|
#include "config/player_manager.hpp"
|
||||||
|
#include "config/user_config.hpp"
|
||||||
#include "graphics/material.hpp"
|
#include "graphics/material.hpp"
|
||||||
#include "guiengine/CGUISpriteBank.hpp"
|
#include "guiengine/CGUISpriteBank.hpp"
|
||||||
#include "karts/kart_properties.hpp"
|
#include "karts/kart_properties.hpp"
|
||||||
@ -172,11 +173,16 @@ void GhostReplaySelection::init()
|
|||||||
Screen::init();
|
Screen::init();
|
||||||
m_cur_difficulty = race_manager->getDifficulty();
|
m_cur_difficulty = race_manager->getDifficulty();
|
||||||
|
|
||||||
int icon_height = getHeight()/24;
|
int icon_height = UserConfigParams::m_hidpi_enabled ? getHeight() / 15
|
||||||
|
: getHeight() / 24;
|
||||||
|
|
||||||
|
int row_height = UserConfigParams::m_hidpi_enabled ? getHeight() / 12
|
||||||
|
: getHeight() / 24;
|
||||||
|
|
||||||
// 128 is the height of the image file
|
// 128 is the height of the image file
|
||||||
m_icon_bank->setScale(icon_height/128.0f);
|
m_icon_bank->setScale(icon_height/128.0f);
|
||||||
m_icon_bank->setTargetIconSize(128, 128);
|
m_icon_bank->setTargetIconSize(128, 128);
|
||||||
m_replay_list_widget->setIcons(m_icon_bank, (int)icon_height);
|
m_replay_list_widget->setIcons(m_icon_bank, (int)row_height);
|
||||||
|
|
||||||
refresh(/*reload replay files*/ false, /* update columns */ true);
|
refresh(/*reload replay files*/ false, /* update columns */ true);
|
||||||
} // init
|
} // init
|
||||||
|
@ -129,8 +129,17 @@ void NetworkingLobby::loadedFromFile()
|
|||||||
m_icon_bank->addTextureAsSprite(icon_3);
|
m_icon_bank->addTextureAsSprite(icon_3);
|
||||||
m_icon_bank->addTextureAsSprite(icon_4);
|
m_icon_bank->addTextureAsSprite(icon_4);
|
||||||
m_icon_bank->addTextureAsSprite(icon_5);
|
m_icon_bank->addTextureAsSprite(icon_5);
|
||||||
|
|
||||||
|
|
||||||
|
if (UserConfigParams::m_hidpi_enabled)
|
||||||
|
{
|
||||||
|
m_icon_bank->setScale(getHeight() / 15.0f / 128.0f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
const int screen_width = irr_driver->getFrameSize().Width;
|
const int screen_width = irr_driver->getFrameSize().Width;
|
||||||
m_icon_bank->setScale(screen_width > 1280 ? 0.4f : 0.25f);
|
m_icon_bank->setScale(screen_width > 1280 ? 0.4f : 0.25f);
|
||||||
|
}
|
||||||
} // loadedFromFile
|
} // loadedFromFile
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user