moving the button to xml
This commit is contained in:
parent
5a43fecdd0
commit
fb50c9c338
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<stkgui>
|
||||
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row">
|
||||
<spacer width="10" proportion="1"/>
|
||||
<button id="continue" x="20" width="250" align="left" text="Continue"/>
|
||||
<div x="2%" y="2%" width="96%" height="96%" layout="horizontal-row">
|
||||
<button id="continue" width="250" align="bottom" text="Continue"/>
|
||||
<spacer width="20"/>
|
||||
<button id="save" width="250" align="bottom" text="Save Grand Prix"/>
|
||||
</div>
|
||||
</stkgui>
|
||||
|
@ -1,7 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<stkgui>
|
||||
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row">
|
||||
<spacer width="10" proportion="1"/>
|
||||
<button id="continue" x="20" width="250" align="left" text="Continue"/>
|
||||
<div x="2%" y="2%" width="96%" height="96%" layout="horizontal-row">
|
||||
<button id="continue" width="250" align="bottom" text="Continue"/>
|
||||
<spacer width="20"/>
|
||||
<button id="save" width="250" align="bottom" text="Save Grand Prix"/>
|
||||
</div>
|
||||
</stkgui>
|
||||
|
||||
|
@ -26,20 +26,10 @@ typedef GUIEngine::ButtonWidget Button;
|
||||
void GrandPrixCutscene::saveGPButton()
|
||||
{
|
||||
#ifdef IMPLEMENTATION_FINISHED
|
||||
if (race_manager->getGrandPrix().getId() == "random")
|
||||
{
|
||||
core::stringw text = _("Save Grand Prix");
|
||||
Button* save_button = new Button();
|
||||
save_button->m_properties[GUIEngine::PROP_ID] = "save gp";
|
||||
Button* c = getWidget<Button>("continue");
|
||||
save_button->m_x = c->m_x + c->m_w + 20;
|
||||
save_button->m_y = c->m_y;
|
||||
save_button->m_w = GUIEngine::getFont()->getDimension(text.c_str()).Width + 30;
|
||||
save_button->m_h = c->m_h;
|
||||
save_button->setText(text);
|
||||
save_button->add();
|
||||
manualAddWidget(save_button);
|
||||
}
|
||||
if (race_manager->getGrandPrix().getId() != "random")
|
||||
getWidget<Button>("save")->setVisible(false);
|
||||
#else
|
||||
getWidget<Button>("save")->setVisible(false);
|
||||
#endif
|
||||
} // saveGPButton
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user