Some tweaks in soccer setup screen

This commit is contained in:
Deve 2019-01-03 21:44:15 +01:00
parent b0ff15873e
commit d46f0aeddb
2 changed files with 19 additions and 19 deletions

View File

@ -2,26 +2,35 @@
<stkgui>
<icon-button id="back" x="0" y="0" height="8%" icon="gui/icons/back.png"/>
<icon id="red_team" I18N="In soccer setup screen" text="Red Team" icon="gui/icons/soccer_ball_red.png" width="7%" height="7%"/>
<icon id="blue_team" I18N="In soccer setup screen" text="Blue Team" icon="gui/icons/soccer_ball_blue.png" width="7%" height="7%"/>
<div x="2%" y="1%" width="96%" height="98%" layout="vertical-row" >
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row" >
<header width="80%" text="Race Setup" align="center" text_align="center" />
<spacer height="1%" width="25"/>
<spacer height="1%" width="25"/>
<bubble height="fit" width="100%" id="lblLeftRight" I18N="In soccer setup screen" text="Use left/right to choose your team and press fire" word_wrap="true" text_align="center"/>
<spacer height="1%" width="25"/>
<div id="central_div" layout="horizontal-row" width="100%" proportion="1" align="center">
<roundedbox width="100%" layout="horizontal-row" height="100%">
<roundedbox layout="vertical-row" width="100%" proportion="1" align="center">
<spacer height="2%" width="25"/>
<div layout="horizontal-row" width="100%" height="12%" align="center">
<spacer height="10" proportion="1"/>
<icon id="red_team" I18N="In soccer setup screen" text="Red Team" icon="gui/icons/soccer_ball_red.png" height="100%"/>
<spacer height="10" proportion="2"/>
<icon id="blue_team" I18N="In soccer setup screen" text="Blue Team" icon="gui/icons/soccer_ball_blue.png" height="100%"/>
<spacer height="10" proportion="1"/>
</div>
<spacer height="2%" width="25"/>
<div id="central_div" layout="horizontal-row" width="100%" proportion="1" align="center">
<!-- Content is added programmatically -->
</roundedbox>
</div>
</div>
<spacer height="2%" width="25"/>
</roundedbox>
<spacer height="1%" width="25"/>

View File

@ -108,15 +108,6 @@ void SoccerSetupScreen::beforeAddingWidget()
{
Widget* central_div = getWidget<Widget>("central_div");
// Add red/blue team icon above the karts
IconButtonWidget* red = getWidget<IconButtonWidget>("red_team");
IconButtonWidget* blue = getWidget<IconButtonWidget>("blue_team");
red->m_x = central_div->m_x + central_div->m_w/4 - red->m_w/2;
red->m_y = central_div->m_y + (int)(red->m_h * 0.5f);
blue->m_x = central_div->m_x + (central_div->m_w/4)*3 - blue->m_w/2;
blue->m_y = central_div->m_y + (int)(blue->m_h * 0.5f);
// Add the 3D views for the karts
int nb_players = race_manager->getNumPlayers();
for(int i=0 ; i < nb_players ; i++)