Use the same size for back arrow in pause dialog as for other icons

This commit is contained in:
Deve 2019-01-07 23:42:40 +01:00
parent df0377b0fc
commit d95a1ab27e
3 changed files with 16 additions and 12 deletions

View File

@ -3,12 +3,14 @@
<div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" >
<header id="title" width="100%" text_align="center" text="Paused" proportion="2" />
<!-- FIXME: some play in proportions occur below because the text of an icon
button is added UNDER it and not within its allocated height -->
<icon-button id="backbtn" align="center" icon="gui/icons/back.png" extend_label="200"
I18N="In the in-game dialog" text="Back to Game" proportion="3"/>
<spacer width="20" height="2%" />
<spacer width="20" height="50" />
<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="In the in-game dialog" text="Back to Game"/>
</buttonbar>
<spacer width="20" height="8%" />
<buttonbar id="choiceribbon" proportion="4" width="100%" align="center">

View File

@ -3,12 +3,14 @@
<div x="2%" y="5%" width="96%" height="90%" layout="vertical-row" >
<header id="title" width="100%" text_align="center" text="Paused" proportion="2" />
<!-- FIXME: some play in proportions occur below because the text of an icon
button is added UNDER it and not within its allocated height -->
<icon-button id="backbtn" align="center" icon="gui/icons/back.png" extend_label="200"
I18N="Race paused button" text="Back to Race" proportion="3"/>
<spacer width="20" height="2%" />
<spacer width="20" height="50" />
<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"/>
</buttonbar>
<spacer width="20" height="8%" />
<buttonbar id="choiceribbon" proportion="4" width="100%" align="center">

View File

@ -60,7 +60,7 @@ RacePausedDialog::RacePausedDialog(const float percentWidth,
loadFromFile("race_paused_dialog.stkgui");
}
IconButtonWidget* back_btn = getWidget<IconButtonWidget>("backbtn");
GUIEngine::RibbonWidget* back_btn = getWidget<RibbonWidget>("backbtnribbon");
back_btn->setFocusForPlayer( PLAYER_ID_GAME_MASTER );
if (NetworkConfig::get()->isNetworking())
@ -137,7 +137,7 @@ GUIEngine::EventPropagation
GUIEngine::RibbonWidget* choice_ribbon =
getWidget<GUIEngine::RibbonWidget>("choiceribbon");
if (eventSource == "backbtn")
if (eventSource == "backbtnribbon")
{
// unpausing is done in the destructor so nothing more to do here
ModalDialog::dismiss();