Tweak soccer setup screen to be clearer

This commit is contained in:
Marianne Gagnon 2016-01-17 21:21:55 -05:00
parent 6e2f1c98e1
commit 025c117d58
2 changed files with 8 additions and 4 deletions

View File

@ -31,7 +31,7 @@
<spacer height="10" width="25"/>
<bright height="10" width="25" I18N="In soccer setup screen" text="Use left/right to choose your team and press fire" text_align="center" align="center" />
<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"/>
<div id="central_div" layout="horizontal-row" width="100%" proportion="1" align="center">
<roundedbox y="5%" width="100%" layout="horizontal-row" height="95%">

View File

@ -19,6 +19,7 @@
#include "audio/sfx_manager.hpp"
#include "config/user_config.hpp"
#include "guiengine/widgets/bubble_widget.hpp"
#include "guiengine/widgets/button_widget.hpp"
#include "guiengine/widgets/spinner_widget.hpp"
#include "guiengine/widgets/check_box_widget.hpp"
@ -245,7 +246,8 @@ GUIEngine::EventPropagation SoccerSetupScreen::filterActions(PlayerAction action
if(m_schedule_continue)
return EVENT_BLOCK;
ButtonWidget* bt_continue = getWidget<ButtonWidget>("continue");
ButtonWidget* bt_continue = getWidget<ButtonWidget>("continue");
BubbleWidget* bubble = getWidget<BubbleWidget>("lblLeftRight");
GUIEngine::EventPropagation result = EVENT_LET;
SoccerTeam team_switch = SOCCER_TEAM_NONE;
int nb_players = (int)m_kart_view_info.size();
@ -253,7 +255,8 @@ GUIEngine::EventPropagation SoccerSetupScreen::filterActions(PlayerAction action
switch(action)
{
case PA_MENU_LEFT:
if (bt_continue->isFocusedForPlayer(PLAYER_ID_GAME_MASTER) &&
if ((bt_continue->isFocusedForPlayer(PLAYER_ID_GAME_MASTER) ||
bubble->isFocusedForPlayer(PLAYER_ID_GAME_MASTER)) &&
m_kart_view_info[playerId].confirmed == false)
{
team_switch = SOCCER_TEAM_RED;
@ -265,7 +268,8 @@ GUIEngine::EventPropagation SoccerSetupScreen::filterActions(PlayerAction action
}
break;
case PA_MENU_RIGHT:
if (bt_continue->isFocusedForPlayer(PLAYER_ID_GAME_MASTER) &&
if ((bt_continue->isFocusedForPlayer(PLAYER_ID_GAME_MASTER) ||
bubble->isFocusedForPlayer(PLAYER_ID_GAME_MASTER)) &&
m_kart_view_info[playerId].confirmed == false)
{
team_switch = SOCCER_TEAM_BLUE;