IV for better row size (#3920)
* Smaller rows * Bigger row * Smaller row
This commit is contained in:
parent
80be3a936a
commit
86a0d06f99
@ -145,9 +145,9 @@ void AddonsScreen::init()
|
||||
getWidget<GUIEngine::ListWidget>("list_addons");
|
||||
|
||||
// This defines the row height !
|
||||
m_icon_height = GUIEngine::getFontHeight() * 5 / 2;
|
||||
m_icon_height = GUIEngine::getFontHeight() * 2;
|
||||
// 128 is the height of the image file
|
||||
m_icon_bank->setScale((float)GUIEngine::getFontHeight() / 64.0f);
|
||||
m_icon_bank->setScale((float)GUIEngine::getFontHeight() / 72.0f);
|
||||
w_list->setIcons(m_icon_bank, (int)(m_icon_height));
|
||||
|
||||
m_type = "kart";
|
||||
|
@ -137,7 +137,7 @@ void ServerSelection::init()
|
||||
m_searcher->clearListeners();
|
||||
m_searcher->addListener(this);
|
||||
|
||||
m_icon_bank->setScale((float)GUIEngine::getFontHeight() / 64.0f);
|
||||
m_icon_bank->setScale((float)GUIEngine::getFontHeight() / 72.0f);
|
||||
m_icon_bank->setTargetIconSize(128, 128);
|
||||
|
||||
video::ITexture* icon1 = irr_driver->getTexture(
|
||||
@ -159,7 +159,7 @@ void ServerSelection::init()
|
||||
m_icon_bank->addTextureAsSprite(tex);
|
||||
}
|
||||
|
||||
int row_height = GUIEngine::getFontHeight() * 5 / 2;
|
||||
int row_height = GUIEngine::getFontHeight() * 2;
|
||||
|
||||
m_server_list_widget->setIcons(m_icon_bank, row_height);
|
||||
m_sort_desc = false;
|
||||
|
@ -69,9 +69,8 @@ void OptionsScreenInput::loadedFromFile()
|
||||
m_icon_bank->addTextureAsSprite(icon3);
|
||||
m_icon_bank->addTextureAsSprite(icon4);
|
||||
|
||||
// scale icons depending on screen resolution. the numbers below are a bit arbitrary
|
||||
const int screen_width = irr_driver->getFrameSize().Width;
|
||||
const float scale = 0.3f + 0.2f*std::max(0, screen_width - 640)/564.0f;
|
||||
// scale icons depending on font height
|
||||
const float scale = GUIEngine::getFontHeight() / 72.0f;
|
||||
m_icon_bank->setScale(scale);
|
||||
} // loadFromFile
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user