- Timestamp:
- 08/26/11 06:25:41 (13 years ago)
- Location:
- ps/trunk/binaries/data/mods/public/gui/pregame
- Files:
-
- 2 edited
-
mainmenu.js (modified) (1 diff)
-
mainmenu.xml (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.js
r10042 r10097 99 99 } 100 100 101 // Update the submenu 102 var margin = 4; 103 var currentSubmenu; 104 function updateSubmenu(buttonName, newSubmenu) 105 { 106 // hide old submenu if possible 107 if (null != currentSubmenu) 108 { 109 getGUIObjectByName(currentSubmenu).hidden = true; 110 } 111 112 // save new submenu 113 currentSubmenu = newSubmenu; 114 115 // unhide new submenu 116 getGUIObjectByName(currentSubmenu).hidden = false; 117 118 // find position of new submenu 119 var mainMenubutton = getGUIObjectByName(buttonName); 120 var verticalOffset = getGUIObjectByName("mainMenuButtons").size.top; 121 var top = verticalOffset + mainMenubutton.size.top - margin; 122 var bottom = verticalOffset + mainMenubutton.size.bottom + margin; 123 124 // set position of new submenu 125 var submenu = getGUIObjectByName("submenu"); 126 submenu.size = submenu.size.left + " " + top + " " + submenu.size.right + " " + bottom; 127 submenu.hidden = false; 128 129 // prepare to hide the submenu when the mouse moves off of the submenu 130 getGUIObjectByName("submenuScreen").hidden = false; 131 } 132 101 133 // Helper function that enables the dark background mask, then reveals a given subwindow object. 102 134 function openMainMenuSubWindow (windowName) -
ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.xml
r10096 r10097 66 66 </object> 67 67 68 69 <!-- 70 ========================================== 71 - MAIN MENU - USER REPORT 72 ========================================== 73 --> 74 75 <object 76 name="userReportDisabled" 77 size="100%-304 100%-154 100%-4 100%-4" 78 type="image" 79 style="userReportPanel" 80 > 81 <object 82 type="text" 83 style="userReportText" 84 >[font="serif-bold-16"]Help improve 0 A.D.![/font] 85 86 You can automatically send us anonymous feedback that will help us fix bugs, and improve performance and compatibility. 87 </object> 88 <object type="button" style="wheatButton" size="4 100%-36 150 100%-4"> 89 [font="serif-bold-16"]Enable feedback 90 <action on="Press">Engine.SetUserReportEnabled(true);</action> 91 </object> 92 <object type="button" style="wheatButton" size="100%-150 100%-36 100%-4 100%-4"> 93 Technical details 94 <action on="Press">Engine.PushGuiPage("page_manual.xml", { "page": "userreport" });</action> 95 </object> 96 </object> 97 98 <object 99 name="userReportEnabled" 100 size="100%-304 100%-294 100%-4 100%-4" 101 type="image" 102 style="userReportPanel" 103 > 104 <object 105 name="userReportEnabledText" 106 type="text" 107 style="userReportText" 108 >[font="serif-bold-16"]Thank you for helping improve 0 A.D.![/font] 109 110 Anonymous feedback is currently enabled. 111 Status: $status. 112 </object> 113 <!-- 114 Put the rest of the text in a separate box, so that 115 very long $status messages don't mess up the layout 116 quite so badly: 117 --> 118 <object 119 type="text" 120 style="userReportText" 121 size="0 90 100% 100%" 122 >If you want to send a message to the developers, you can enter one here: 123 </object> 124 125 <object 126 name="userReportMessageInput" 127 size="4 130 100%-4 200" 128 type="input" 129 style="wheatInput" 130 multiline="true" 131 scrollbar="true" 132 scrollbar_style="wheatScrollBar" 133 /> 134 135 <object size="100%-124 204 100%-4 236" type="button" style="wheatButton"> 136 Send Message 137 <action on="Press">submitUserReportMessage();</action> 138 </object> 139 140 <object type="button" style="wheatButton" size="4 100%-36 150 100%-4"> 141 Disable feedback 142 <action on="Press">Engine.SetUserReportEnabled(false);</action> 143 </object> 144 <object type="button" style="wheatButton" size="100%-150 100%-36 100%-4 100%-4"> 145 Technical details 146 <action on="Press">Engine.PushGuiPage("page_manual.xml", { "page": "userreport" });</action> 147 </object> 148 </object> 149 150 151 152 68 153 <!-- 69 154 ========================================== … … 75 160 style="MainMenuPanel" 76 161 size="60 -2 300 100%+2" 162 77 163 > 78 79 80 164 <object name="productLogo" 81 165 type="image" 166 sprite="productLogo" 82 167 ghost="true" 83 168 size="50%-110 30 50%+110 130" 84 sprite="productLogo"85 169 /> 86 170 87 <object 171 <object name="mainMenuButtons" 172 type="image" 88 173 size="8 156 100%-8 356" 174 ghost="false" 89 175 > 176 <!-- Allows sliding the mouse over to submenu without it closing automatically --> 177 <object 178 type="image" 179 size="100% 0 100%+8 100%" 180 ghost="false" 181 /> 182 90 183 <object name="menuLearnToPlayButton" 91 184 type="button" … … 110 203 Single Player 111 204 <action on="Press"><![CDATA[ 112 // Open Session Setup window. 113 Engine.PushGuiPage("page_gamesetup.xml", { type: "offline" }); 205 updateSubmenu("menuSinglePlayerButton", "submenuSinglePlayer"); 114 206 ]]></action> 115 207 </object> 116 208 117 <object name="menuMulti PlayerButton"209 <object name="menuMultiplayerButton" 118 210 style="StoneButtonFancy" 119 211 type="button" … … 124 216 Multiplayer 125 217 <action on="Press"><![CDATA[ 126 // Open Multiplayer connection window. 127 Engine.PushGuiPage("page_gamesetup_mp.xml"); 218 updateSubmenu("menuMultiplayerButton", "submenuMultiplayer"); 128 219 ]]></action> 129 220 </object> … … 209 300 <object size="8 50%+40 100%-8 50%+280" 210 301 type="image" 211 style="stoneTooltip" 302 style="stoneTooltip" 303 ghost="true" 212 304 > 213 305 … … 219 311 textcolor="white" 220 312 size="8 8 100%-8 100%-36" 313 ghost="true" 221 314 > 222 315 [font="serif-bold-18"]Alpha Version[/font] … … 232 325 tooltip_style="pgToolTip" 233 326 tooltip="Click to open wildfiregames.com/0ad in your web browser." 234 size="8 100%-40 50%- 2100%-8"327 size="8 100%-40 50%-4 100%-8" 235 328 > 236 329 Website … … 246 339 tooltip_style="pgToolTip" 247 340 tooltip="Click to chat in IRC. (#0ad at webchat.quakenet.org)" 248 size="50%+ 2100%-40 100%-8 100%-8"341 size="50%+4 100%-40 100%-8 100%-8" 249 342 > 250 343 IRC … … 260 353 <object 261 354 size="4 100%-84 100%-4 100%-56" 355 ghost="true" 262 356 > 263 357 … … 265 359 <object name="companyLogo" 266 360 type="image" 267 ghost="true"268 size="50%-16 0 50%+16 32"269 361 sprite="companyLogo" 362 ghost="true" 363 size="50%-16 0 50%+16 32" 270 364 /> 271 365 272 366 <!-- COMPANY NAME --> 273 <object 274 type="text" 367 <object type="text" 275 368 style="SmallTitleText" 276 size="50%-128 32 50%+128 48" 369 ghost="true" 370 size="50%-128 32 50%+128 48" 277 371 >WILDFIRE GAMES</object> 278 372 </object> … … 291 385 292 386 </object> 293 387 388 389 390 391 <!-- 392 ========================================== 393 - MAIN MENU SIDE PANEL 394 ========================================== 395 --> 396 397 <object 398 name="submenuScreen" 399 type="image" 400 > 401 <action on="MouseEnter"> 402 <![CDATA[getGUIObjectByName("submenu").hidden = true;;]]> 403 </action> 404 <object 405 name="submenu" 406 type="image" 407 style="MainMenuPanel" 408 size="298 50%-100 538 50%+100" 409 > 410 <object name="submenuSinglePlayer" 411 type="image" 412 size="4 4 100%-4 100%-4" 413 tooltip_style="pgToolTip" 414 tooltip="The 0 A.D. Game Manual" 415 hidden="true" 416 > 417 <object name="subMenuSinglePlayerButton" 418 type="button" 419 style="StoneButtonFancy" 420 size="0 0 100% 32" 421 tooltip_style="pgToolTip" 422 tooltip="Click here to start a new single player game. (A very basic computer opponent is available for testing purposes.)" 423 > 424 Single Player 425 <action on="Press"><![CDATA[ 426 // Open Session Setup window. 427 Engine.PushGuiPage("page_gamesetup.xml", { type: "offline" }); 428 ]]></action> 429 </object> 430 </object> 431 432 433 <object name="submenuMultiplayer" 434 type="image" 435 size="4 4 100%-4 100%-4" 436 tooltip_style="pgToolTip" 437 tooltip="The 0 A.D. Game Manual" 438 hidden="true" 439 > 440 <object name="subMenuMultiplayerJoinGameButton" 441 type="button" 442 style="StoneButtonFancy" 443 size="0 0 100% 32" 444 tooltip_style="pgToolTip" 445 tooltip="Tired of playing with yourself? Fight against one or more human players in a multiplayer game." 446 > 447 Multiplayer 448 <action on="Press"><![CDATA[ 449 // Open Multiplayer connection window. 450 Engine.PushGuiPage("page_gamesetup_mp.xml"); 451 ]]></action> 452 </object> 453 </object> 454 </object> 455 456 </object> <!-- end of screen --> 457 458 459 460 461 462 463 464 465 466 467 468 469 294 470 <!-- 295 471 <object name="pgCampaignsBt" … … 469 645 </object> 470 646 --> 471 <!-- 472 ========================================== 473 - MAIN MENU - USER REPORT 474 ========================================== 475 --> 476 477 <object 478 name="userReportDisabled" 479 size="100%-304 100%-154 100%-4 100%-4" 480 type="image" 481 style="userReportPanel" 482 > 483 <object 484 type="text" 485 style="userReportText" 486 >[font="serif-bold-16"]Help improve 0 A.D.![/font] 487 488 You can automatically send us anonymous feedback that will help us fix bugs, and improve performance and compatibility. 489 </object> 490 <object type="button" style="wheatButton" size="4 100%-36 150 100%-4"> 491 [font="serif-bold-16"]Enable feedback 492 <action on="Press">Engine.SetUserReportEnabled(true);</action> 493 </object> 494 <object type="button" style="wheatButton" size="100%-150 100%-36 100%-4 100%-4"> 495 Technical details 496 <action on="Press">Engine.PushGuiPage("page_manual.xml", { "page": "userreport" });</action> 497 </object> 498 </object> 499 500 <object 501 name="userReportEnabled" 502 size="100%-304 100%-294 100%-4 100%-4" 503 type="image" 504 style="userReportPanel" 505 > 506 <object 507 name="userReportEnabledText" 508 type="text" 509 style="userReportText" 510 >[font="serif-bold-16"]Thank you for helping improve 0 A.D.![/font] 511 512 Anonymous feedback is currently enabled. 513 Status: $status.</object> 514 <!-- 515 Put the rest of the text in a separate box, so that 516 very long $status messages don't mess up the layout 517 quite so badly: 518 --> 519 <object 520 type="text" 521 style="userReportText" 522 size="0 90 100% 100%" 523 >If you want to send a message to the developers, you can enter one here: 524 </object> 525 526 <object 527 name="userReportMessageInput" 528 size="4 130 100%-4 200" 529 type="input" 530 style="wheatInput" 531 multiline="true" 532 scrollbar="true" 533 scrollbar_style="wheatScrollBar" 534 /> 535 536 <object size="100%-124 204 100%-4 236" type="button" style="wheatButton"> 537 Send Message 538 <action on="Press">submitUserReportMessage();</action> 539 </object> 540 541 <object type="button" style="wheatButton" size="4 100%-36 150 100%-4"> 542 Disable feedback 543 <action on="Press">Engine.SetUserReportEnabled(false);</action> 544 </object> 545 <object type="button" style="wheatButton" size="100%-150 100%-36 100%-4 100%-4"> 546 Technical details 547 <action on="Press">Engine.PushGuiPage("page_manual.xml", { "page": "userreport" });</action> 548 </object> 549 </object> 647 550 648 551 649 </object> … … 557 655 --> 558 656 559 <object name="pgSubWindow"657 <!-- <object name="pgSubWindow" 560 658 type="image" 561 659 z="90" 562 660 hidden="true" 563 661 sprite="bkTranslucent" 564 > 662 >--> 565 663 566 664 <!-- … … 1502 1600 </object> 1503 1601 --> 1504 </object> 1602 1603 <!--END OF pgSubWindow--> 1604 <!-- </object>--> 1605 1505 1606 </objects>
Note:
See TracChangeset
for help on using the changeset viewer.
