Use a single menu
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7520 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
9421df49ad
commit
52811d8752
@ -1,20 +1,19 @@
|
||||
<stkgui>
|
||||
|
||||
<div x="5%" y="0" width="90%" height="98%" layout="vertical-row" >
|
||||
<div x="5%" y="0" width="90%" height="100%" layout="vertical-row" >
|
||||
|
||||
<icon id="logo" align="center" proportion="8" width="100%" icon="gui/logo.png"/>
|
||||
|
||||
<buttonbar id="menu_toprow" proportion="3" width="75%" align="center">
|
||||
<icon-button id="new" width="128" height="128" icon="gui/main_race.png"
|
||||
I18N="Main menu button" text="Race"/>
|
||||
<icon-button id="network" width="128" height="128" icon="gui/main_options.png"
|
||||
I18N="Main menu button" text="DEBUG"/>
|
||||
<icon-button id="multiplayer" width="128" height="128" icon="gui/main_race_multi.png"
|
||||
I18N="Main menu button" text="Multiplayer Race"/>
|
||||
<icon-button id="challenges" width="128" height="128"
|
||||
icon="gui/challenge.png"
|
||||
I18N="Main menu button" text="Challenges"/>
|
||||
<icon-button id="tutorial" width="128" height="128"
|
||||
icon="gui/tutorial.png"
|
||||
I18N="Main menu button" text="Tutorial"/>
|
||||
<icon-button id="addons" width="128" height="128"
|
||||
icon="gui/addons.png"
|
||||
I18N="Main menu button" text="Addons"/>
|
||||
</buttonbar>
|
||||
|
||||
<spacer width="10" proportion="1"/>
|
||||
@ -32,6 +31,20 @@
|
||||
|
||||
<spacer width="10" proportion="1"/>
|
||||
|
||||
<bottombar width="100%" height="10%" layout="horizontal-row">
|
||||
<div proportion="1" height="100%" layout="horizontal-row">
|
||||
<icon-button id="lang_combo" icon="gui/dropdown.png" height="100%" align="center"/>
|
||||
</div>
|
||||
|
||||
<label proportion="3" height="100%" id="info_addons"
|
||||
I18N="In the main screen"
|
||||
text="Loading news from stkaddons..."
|
||||
align="center" text_align="center" />
|
||||
|
||||
<placeholder id="empty_for_now" proportion="1">
|
||||
</placeholder>
|
||||
</bottombar>
|
||||
|
||||
</div>
|
||||
|
||||
</stkgui>
|
||||
</stkgui>
|
||||
|
@ -1,50 +0,0 @@
|
||||
<stkgui>
|
||||
|
||||
<div x="5%" y="0" width="90%" height="100%" layout="vertical-row" >
|
||||
|
||||
<icon id="logo" align="center" proportion="8" width="100%" icon="gui/logo.png"/>
|
||||
<buttonbar id="menu_toprow" proportion="3" width="75%" align="center">
|
||||
<icon-button id="new" width="128" height="128" icon="gui/main_race.png"
|
||||
I18N="Main menu button" text="Race"/>
|
||||
<icon-button id="multiplayer" width="128" height="128" icon="gui/main_race_multi.png"
|
||||
I18N="Main menu button" text="Multiplayer Race"/>
|
||||
<icon-button id="challenges" width="128" height="128"
|
||||
icon="gui/challenge.png"
|
||||
I18N="Main menu button" text="Challenges"/>
|
||||
<icon-button id="addons" width="128" height="128"
|
||||
icon="gui/addons.png"
|
||||
I18N="Main menu button" text="Addons"/>
|
||||
</buttonbar>
|
||||
|
||||
<spacer width="10" proportion="1"/>
|
||||
|
||||
<buttonbar id="menu_bottomrow" proportion="3" width="85%" align="center">
|
||||
<icon-button id="options" width="128" height="128" icon="gui/main_options.png"
|
||||
I18N="Main menu button" text="Options"/>
|
||||
<icon-button id="help" width="128" height="128" icon="gui/main_help.png"
|
||||
I18N="Main menu button" text="Help"/>
|
||||
<icon-button id="about" width="128" height="128" icon="gui/main_about.png"
|
||||
I18N="Main menu button" text="About"/>
|
||||
<icon-button id="quit" width="128" height="128" icon="gui/main_quit.png"
|
||||
I18N="Main menu button" text="Quit"/>
|
||||
</buttonbar>
|
||||
|
||||
<spacer width="10" proportion="1"/>
|
||||
|
||||
<bottombar width="100%" height="10%" layout="horizontal-row">
|
||||
<div proportion="1" height="100%" layout="horizontal-row">
|
||||
<icon-button id="lang_combo" icon="gui/dropdown.png" height="100%" align="center"/>
|
||||
</div>
|
||||
|
||||
<label proportion="3" height="100%" id="info_addons"
|
||||
I18N="In the main screen"
|
||||
text="Loading news from stkaddons..."
|
||||
align="center" text_align="center" />
|
||||
|
||||
<placeholder id="empty_for_now" proportion="1">
|
||||
</placeholder>
|
||||
</bottombar>
|
||||
|
||||
</div>
|
||||
|
||||
</stkgui>
|
@ -54,21 +54,21 @@ using namespace GUIEngine;
|
||||
DEFINE_SCREEN_SINGLETON( MainMenuScreen );
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
#ifdef ADDONS_MANAGER
|
||||
MainMenuScreen::MainMenuScreen() : Screen("mainaddons.stkgui")
|
||||
{
|
||||
}
|
||||
#else
|
||||
|
||||
MainMenuScreen::MainMenuScreen() : Screen("main.stkgui")
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
void MainMenuScreen::loadedFromFile()
|
||||
{
|
||||
m_lang_popup = NULL;
|
||||
|
||||
#ifndef ADDONS_MANAGER
|
||||
RibbonWidget* r = this->getWidget<RibbonWidget>("menu_toprow");
|
||||
if (r != NULL) r->deleteChild("addons");
|
||||
#endif
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
@ -110,12 +110,14 @@ void MainMenuScreen::init()
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
void MainMenuScreen::onUpdate(float delta, irr::video::IVideoDriver* driver)
|
||||
{
|
||||
IconButtonWidget* icon = this->getWidget<IconButtonWidget>("addons");
|
||||
if(!addons_manager->onlineReady())
|
||||
icon->setDeactivated();
|
||||
else
|
||||
icon->setActivated();
|
||||
|
||||
IconButtonWidget* addons_icon = this->getWidget<IconButtonWidget>("addons");
|
||||
if (addons_icon != NULL)
|
||||
{
|
||||
if(!addons_manager->onlineReady())
|
||||
addons_icon->setDeactivated();
|
||||
else
|
||||
addons_icon->setActivated();
|
||||
}
|
||||
|
||||
LabelWidget* w = this->getWidget<LabelWidget>("info_addons");
|
||||
const std::string &news_text = network_http->getNewsMessage();
|
||||
|
Loading…
x
Reference in New Issue
Block a user