This commit is contained in:
Kuba 2021-05-08 04:24:36 +02:00 committed by GitHub
parent fc387fa30d
commit 2cc16b4edb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 5 deletions

View File

@ -7,7 +7,7 @@
<buttonbar id="backbtnribbon" proportion="4" width="100%" align="center">
<icon-button id="backbtn" width="128" height="128" align="center" icon="gui/icons/back.png"
extend_label="200" I18N="Race paused button" text="Back to Race"/>
extend_label="200" I18N="Race paused button" raw_text="Text"/>
<icon-button id="touch_device" width="128" height="128" align="center" icon="gui/icons/android/gyroscope_icon.png"
extend_label="200" I18N="Race paused button" text="Gyroscope"/>
</buttonbar>
@ -17,10 +17,10 @@
<buttonbar id="choiceribbon" proportion="4" width="100%" align="center">
<icon-button id="newrace" width="128" height="128" icon="gui/icons/main_race.png"
I18N="Race paused button" text="Setup New Race" word_wrap="true"/>
I18N="Race paused button" raw_text="Text" word_wrap="true"/>
<icon-button id="restart" width="128" height="128" icon="gui/icons/restart.png"
I18N="Race paused button" text="Restart Race" word_wrap="true"/>
I18N="Race paused button" raw_text="Text" word_wrap="true"/>
<icon-button id="endrace" width="128" height="128" icon="gui/icons/race_giveup.png"
I18N="Race paused button" text="Give Up Race" word_wrap="true"/>
@ -32,7 +32,7 @@
I18N="Race paused button" text="Help" word_wrap="true"/>
<icon-button id="exit" width="128" height="128" icon="gui/icons/main_quit.png"
I18N="Race paused button" text="Exit Race" word_wrap="true"/>
I18N="Race paused button" raw_text="Text" word_wrap="true"/>
</buttonbar>

View File

@ -123,7 +123,30 @@ RacePausedDialog::RacePausedDialog(const float percentWidth,
{
World::getWorld()->schedulePause(WorldStatus::IN_GAME_MENU_PHASE);
}
if (dynamic_cast<OverWorld*>(World::getWorld()) == NULL)
{
if (RaceManager::get()->isBattleMode() || RaceManager::get()->isCTFMode())
{
getWidget<IconButtonWidget>("backbtn")->setLabel(_("Back to Battle"));
if (!NetworkConfig::get()->isNetworking())
{
getWidget<IconButtonWidget>("newrace")->setLabel(_("Setup New Game"));
getWidget<IconButtonWidget>("restart")->setLabel(_("Restart Battle"));
}
getWidget<IconButtonWidget>("exit")->setLabel(_("Exit Battle"));
}
else
{
getWidget<IconButtonWidget>("backbtn")->setLabel(_("Back to Race"));
if (!NetworkConfig::get()->isNetworking())
{
getWidget<IconButtonWidget>("newrace")->setLabel(_("Setup New Race"));
getWidget<IconButtonWidget>("restart")->setLabel(_("Restart Race"));
}
getWidget<IconButtonWidget>("exit")->setLabel(_("Exit Race"));
}
}
#ifndef MOBILE_STK
if (m_text_box && UserConfigParams::m_lobby_chat)
m_text_box->setFocusForPlayer(PLAYER_ID_GAME_MASTER);