UI fix bundle VI (#3926)

* Fix skill bars bug in local multiplayer

* Fix skill bars bug in local multiplayer

* Smaller height

* Better multiplayer spinner
This commit is contained in:
dumaosen 2019-05-20 04:42:46 +08:00 committed by Deve
parent 766c971339
commit 18dc77c8f9
4 changed files with 9 additions and 9 deletions

View File

@ -2148,7 +2148,7 @@ void Skin::drawBadgeOn(const Widget* widget, const core::recti& rect)
}
if (widget->m_badges & KEYBOARD_BADGE)
{
float max_icon_size = 0.43f;
float max_icon_size = 1.0f;
video::ITexture* texture = irr_driver->getTexture(FileManager::GUI_ICON,
"keyboard.png");
doDrawBadge(texture, rect, max_icon_size, true);

View File

@ -203,8 +203,8 @@ void KartStatsWidget::setSize(const int x, const int y, const int w, const int h
m_h = h;
// -- sizes
m_skill_bar_w = w - m_w / 32; // make sure the bars can't be out of screen
m_skill_bar_h = m_h / SKILL_COUNT / 4;
m_skill_bar_w = w - m_w / 16; // make sure the bars can't be out of screen
m_skill_bar_h = m_h / SKILL_COUNT / 5;
m_skill_bar_x = x;
} // setSize

View File

@ -663,15 +663,15 @@ void PlayerKartWidget::setSize(const int x, const int y, const int w, const int
m_h = h;
// -- sizes
player_name_h = 40;
player_name_h = GUIEngine::getFontHeight();
// Set it a bit higher so there's space for "(handicapped)"
if(UserConfigParams::m_per_player_difficulty)
player_name_w = std::min(500, w);
player_name_w = std::min(GUIEngine::getFontHeight() * 12, w);
else
player_name_w = std::min(400, w);
player_name_w = std::min(GUIEngine::getFontHeight() * 10, w);
kart_name_w = w;
kart_name_h = 25;
kart_name_h = GUIEngine::getFontHeight();
// for shrinking effect
if (h < 175)

View File

@ -130,10 +130,10 @@ void SkillLevelWidget::setSize(const int x, const int y, const int w, const int
m_bar_w = m_w - iconbox_w - 25; //leaving just enough space for icon + its margin
m_bar_h = h;
m_bar_x = x + iconbox_w;
m_bar_x = x + iconbox_w + m_w / 32;
m_bar_y = y + h/2 - m_bar_h/2; //align to midpoint in y direction
m_iconbutton_x = x - m_w / 32; //make sure icon has enough space on the right
m_iconbutton_x = x; //make sure icon has enough space on the right
m_iconbutton_y = y + h/2 - m_iconbutton_h/2; //align to midpoint in y direction
} // setSize