GenIII for scaling issues fix (#3917)

* Use foont height

* Use font height

* Bigger size

* Use font height

* Use font height

* Use font height

* Use font height

* Better height

* Use font height

* Use font height

* Bigger size
This commit is contained in:
dumaosen
2019-05-15 18:13:50 +08:00
committed by Deve
parent 6bd92e41a6
commit dff77dd808
10 changed files with 17 additions and 12 deletions

View File

@@ -13,7 +13,7 @@
<list id="replay_list" x="0" y="0" width="100%" height="100%" alternate_bg="true"/>
</box>
<tabs id="race_mode" height="6%" max_height="110" x="1%" width="98%" align="center">
<tabs id="race_mode" height="2f" width="98%" align="center">
<icon-button id="tab_time_trial" width="128" height="128" icon="gui/icons/mode_tt.png"
I18N="In the ghost replay selection screen" text="Time trial"/>
<icon-button id="tab_egg_hunt" width="128" height="128" icon="gui/icons/mode_easter.png"

View File

@@ -8,7 +8,7 @@
<spacer height="25" width="10"/>
<tabs id="profile_tabs" height="10%" max_height="110" x="2%" width="98%" align="center">
<tabs id="profile_tabs" height="2f" x="2%" width="98%" align="center">
<icon-button id="tab_achievements" width="128" height="128" icon="gui/icons/gp_copy.png"
I18N="Section in the profile screen" text="Achievements"/>
<icon-button id="tab_friends" width="128" height="128" icon="gui/icons/options_players.png"/>

View File

@@ -8,7 +8,7 @@
<spacer height="25" width="10"/>
<tabs id="profile_tabs" height="10%" max_height="110" x="2%" width="98%" align="center">
<tabs id="profile_tabs" height="2f" x="2%" width="98%" align="center">
<icon-button id="tab_achievements" width="128" height="128" icon="gui/icons/gp_copy.png"/>
<icon-button id="tab_friends" width="128" height="128" icon="gui/icons/options_players.png"
I18N="Section in the profile screen" text="Friends"/>

View File

@@ -7,7 +7,7 @@
<spacer height="25" width="10"/>
<tabs id="profile_tabs" height="10%" max_height="110" x="2%" width="98%" align="center">
<tabs id="profile_tabs" height="2f" x="2%" width="98%" align="center">
<icon-button id="tab_achievements" width="128" height="128" icon="gui/icons/gp_copy.png"/>
<icon-button id="tab_friends" width="128" height="128" icon="gui/icons/options_players.png" />
<icon-button id="tab_settings" width="128" height="128" icon="gui/icons/main_options.png"

View File

@@ -5,7 +5,7 @@
<header align="center" width="80%" text="Create User" text_align="center"
I18N="In the registration dialog" />
<spacer height="15" width="10"/>
<tabs id="mode_tabs" height="10%" max_height="110" x="2%" width="98%" align="center">
<tabs id="mode_tabs" height="2f" x="2%" width="98%" align="center">
<icon-button id="tab_new_online" width="128" height="128" icon="gui/icons/main_network.png"
I18N="Section in the register screen" text="New Online Account"/>
<icon-button id="tab_existing_online" width="128" height="128" icon="gui/icons/main_network.png"

View File

@@ -14,7 +14,7 @@
</box>
<!-- Populated dynamically at runtime -->
<tabs width="100%" height="5%" id="trackgroups"> </tabs>
<tabs width="100%" height="2f" id="trackgroups"> </tabs>
<spacer width="100%" height="2%" />
<box id="rect-box" width="100%" height="20%" padding="15" layout="vertical-row">

View File

@@ -145,9 +145,9 @@ void AddonsScreen::init()
getWidget<GUIEngine::ListWidget>("list_addons");
// This defines the row height !
m_icon_height = getHeight()/10.0f;
m_icon_height = GUIEngine::getFontHeight() * 5 / 2;
// 128 is the height of the image file
m_icon_bank->setScale((float)getHeight() / 12.0f / 128.0f);
m_icon_bank->setScale((float)GUIEngine::getFontHeight() / 64.0f);
w_list->setIcons(m_icon_bank, (int)(m_icon_height));
m_type = "kart";

View File

@@ -224,7 +224,11 @@ void CreditsScreen::init()
assert(w != NULL);
reset();
setArea(w->m_x + 15, w->m_y + 8, w->m_w - 30, w->m_h - 16);
setArea(w->m_x + GUIEngine::getFontHeight(),
w->m_y + GUIEngine::getFontHeight() / 2,
w->m_w - GUIEngine::getFontHeight() * 2,
w->m_h - GUIEngine::getFontHeight());
} // init
// ----------------------------------------------------------------------------

View File

@@ -137,7 +137,7 @@ void ServerSelection::init()
m_searcher->clearListeners();
m_searcher->addListener(this);
m_icon_bank->setScale((float)GUIEngine::getFontHeight() / 96.0f);
m_icon_bank->setScale((float)GUIEngine::getFontHeight() / 64.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() * 3 / 2;
int row_height = GUIEngine::getFontHeight() * 5 / 2;
m_server_list_widget->setIcons(m_icon_bank, row_height);
m_sort_desc = false;

View File

@@ -724,7 +724,8 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin)
return;
// -2 because that's the spacing further on
int ICON_PLAYER_WIDTH = y_space / (num_karts) - 2;
int ICON_PLAYER_WIDTH = std::max(y_space / (num_karts) - 2,
(unsigned)GUIEngine::getFontHeight());
int icon_width_max = (int)(60*(irr_driver->getActualScreenSize().Width/1024.0f));
int icon_width_min = (int)(35*((irr_driver->getActualScreenSize().Height - (y_base+10))/720.0f));