parent
0f415a3745
commit
2818a1870e
@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<stkgui>
|
||||
<div x="5%" y="5%" width="90%" height="90%" layout="vertical-row" >
|
||||
|
||||
<header id="title" height="10%" width="100%" text="Race Setup" align="center" text_align="center" />
|
||||
|
||||
<spacer height="3%" width="1"/>
|
||||
|
||||
<ribbon id="difficulty" height="25%" width="80%" align="center">
|
||||
<icon-button id="novice" icon="gui/icons/difficulty_easy.png"
|
||||
width="128" height="128" I18N="Difficulty" text="Novice"/>
|
||||
<icon-button id="intermediate" icon="gui/icons/difficulty_medium.png"
|
||||
width="128" height="128" I18N="Difficulty" text="Intermediate"/>
|
||||
<icon-button id="expert" icon="gui/icons/difficulty_hard.png"
|
||||
width="128" height="128" I18N="Difficulty" text="Expert"/>
|
||||
</ribbon>
|
||||
|
||||
<spacer height="3%" width="1"/>
|
||||
|
||||
<label id="challenge_info" height="35%" width="100%" text_align="center"/>
|
||||
|
||||
<spacer height="3%" width="1"/>
|
||||
|
||||
<buttonbar id="actions" height="20%" width="30%" align="center">
|
||||
<icon-button id="back" icon="gui/icons/back.png"
|
||||
width="128" height="128" text="Back"/>
|
||||
<icon-button id="start" icon="gui/icons/green_check.png"
|
||||
width="128" height="128" text="Start Race"/>
|
||||
</buttonbar>
|
||||
|
||||
</div>
|
||||
</stkgui>
|
@ -120,10 +120,7 @@ SelectChallengeDialog::SelectChallengeDialog(const float percentWidth,
|
||||
std::string challenge_id) :
|
||||
ModalDialog(percentWidth, percentHeight)
|
||||
{
|
||||
if (PlayerManager::getCurrentPlayer()->isLocked("difficulty_best"))
|
||||
loadFromFile("select_challenge_nobest.stkgui");
|
||||
else
|
||||
loadFromFile("select_challenge.stkgui");
|
||||
loadFromFile("select_challenge.stkgui");
|
||||
|
||||
m_challenge_id = challenge_id;
|
||||
World::getWorld()->schedulePause(WorldStatus::IN_GAME_MENU_PHASE);
|
||||
@ -185,6 +182,19 @@ SelectChallengeDialog::SelectChallengeDialog(const float percentWidth,
|
||||
track_manager->getTrack(c->getData()->getTrackId())->getName();
|
||||
getWidget<LabelWidget>("title")->setText(track_name, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (PlayerManager::getCurrentPlayer()->isLocked("difficulty_best"))
|
||||
{
|
||||
getWidget<IconButtonWidget>("supertux")->setBadge(LOCKED_BADGE);
|
||||
getWidget<IconButtonWidget>("supertux")->setActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
getWidget<IconButtonWidget>("supertux")->unsetBadge(LOCKED_BADGE);
|
||||
getWidget<IconButtonWidget>("supertux")->setActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user