1
0
forked from 0ad/0ad
0ad/binaries/data/mods/official/gui/test/2_mainmenu.xml

78 lines
4.0 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<objects>
<!--
==========================================
- MAIN MENU -
==========================================
-->
<object type="empty" name="pregame_gui" size="0 0 100% 100%" z="1" hidden="false">
<action on="Load"><![CDATA[
// Play main 0 A.D. theme when the main menu starts.
curr_music = newRandomSound("music", "theme");
curr_music.loop();
curr_music.free(); // Close main theme when starting game session.
curr_session_playlist_1 = newRandomSound("music", "peace");
curr_session_playlist_1.play();
curr_session_playlist_1.free();
curr_session_playlist_2 = newRandomSound("music", "peace");
curr_session_playlist_2.play();
curr_session_playlist_2.free();
]]></action>
<object type="image" name="pregame-mainmenu-background-image" sprite="pregame-mainmenu-background" size="0 0 100% 100%" z="100" hidden="false" />
<object type="button" name="pregame-mainmenu-sp-button" sprite-over="pregame-mainmenu-spbt" size="52.9296875% 23.95833333% 67.578125% 42.317708333%" z="101" hidden="false">
<action on="Press"><![CDATA[
startGame();
GUIObjectUnhide("session_gui");
GUIObjectUnhide("End_Game_Button");
GUIObjectHide("pregame_gui");
FlipGUI(GUIType);
]]></action>
<action on="MouseEnter"><![CDATA[
tooltipObject = getGUIObjectByName("pregame-mainmenu-tooltip");
tooltipObject.caption = "Want to move some Dudes around or test something ? Click here to start a new game on the default map.";
GUIObjectUnhide("pregame-mainmenu-tooltip");
]]></action>
<action on="MouseLeave"><![CDATA[
GUIObjectHide("pregame-mainmenu-tooltip");
]]></action>
</object>
<object type="image" name="pregame-mainmenu-0ad-logo" sprite="pregame-mainmenu-0ad-logo-480x218" size="21.1914062% 3.125% 68.0664062% 31.5104166%" z="102" hidden="false" ghost="true"/>
<object type="text" name="pregame-mainmenu-versionnumber" size="43% 24% 43%+282 24%+25" z="103" textcolor="237 227 167" font="prospero16" hidden="false" ghost="true">
{buildTime}
<action on="Load"><![CDATA[
this.caption = "Build: " + buildTime(0) + " " + getLanguageID();
]]></action>
</object>
<object type="button" name="pregame-mainmenu-wfg-logo" sprite="pregame-mainmenu-wfg-logo-256x64" size="10 91.666666%-30 25.9765% 100%-30" z="102" hidden="false">
<action on="Press"><![CDATA[
btCode = new Array("GUIObjectHide('mb_main');");
messageBox(420, 420, "[icon=0ad_icon] A.D. - History Is Yours For The Taking\nby Wildfire Games, 2002-2005\n\nVersion 0.1.2 (PASAP II)\n\n" +
"This is a confidental pre-release version of the game!\n\nVisit http://www.wildfiregames.com/0ad/ " +
"to learn more about [icon=0ad_icon] A.D., participate in the community and meet the developers.\n\n", "About [icon=0ad_icon] A.D.", 2, new Array(), btCode);
]]></action>
<action on="MouseEnter"><![CDATA[
tooltipObject = getGUIObjectByName("pregame-mainmenu-tooltip");
tooltipObject.caption = "These are the guys who made this game. Visit them at http://www.wildfiregames.com/0ad/";
GUIObjectUnhide("pregame-mainmenu-tooltip");
]]></action>
<action on="MouseLeave"><![CDATA[
GUIObjectHide("pregame-mainmenu-tooltip");
]]></action>
</object>
<object type="text" name="pregame-mainmenu-tooltip" sprite="tooltip-background" size="69% 6.3802% 97.0703125% 28.125%" font="prospero16" textcolor="255 255 255" z="104" hidden="true" ghost="true">tooltipText</object>
</object>
</objects>