- Timestamp:
- 09/01/11 04:36:38 (13 years ago)
- Location:
- ps/trunk/binaries/data/mods/public
- Files:
-
- 19 edited
-
art/textures/ui/global/titlebar/titlebar_left.png (modified) ( previous)
-
art/textures/ui/global/titlebar/titlebar_middle.png (modified) ( previous)
-
art/textures/ui/global/titlebar/titlebar_right.png (modified) ( previous)
-
art/textures/ui/loading/progressbar/progressbar_background_left.png (modified) ( previous)
-
art/textures/ui/loading/progressbar/progressbar_background_middle.png (modified) ( previous)
-
art/textures/ui/loading/progressbar/progressbar_background_right.png (modified) ( previous)
-
art/textures/ui/loading/progressbar/progressbar_left.png (modified) ( previous)
-
art/textures/ui/loading/progressbar/progressbar_middle.png (modified) ( previous)
-
art/textures/ui/loading/progressbar/progressbar_right.png (modified) ( previous)
-
gui/common/common_sprites.xml (modified) (31 diffs)
-
gui/common/common_styles.xml (modified) (1 diff)
-
gui/gamesetup/gamesetup.xml (modified) (3 diffs)
-
gui/loading/loading.js (modified) (5 diffs)
-
gui/loading/loading.xml (modified) (2 diffs)
-
gui/loading/sprites.xml (modified) (5 diffs)
-
gui/pregame/mainmenu.js (modified) (5 diffs)
-
gui/pregame/mainmenu.xml (modified) (5 diffs)
-
gui/session/menu.js (modified) (7 diffs)
-
gui/session/session.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/binaries/data/mods/public/gui/common/common_sprites.xml
r10122 r10155 8 8 ========================================== 9 9 --> 10 10 11 11 <sprite name="productLogo"> 12 12 <image texture="pregame/shell/logo/0ad_logo.png" … … 15 15 /> 16 16 </sprite> 17 17 18 18 <sprite name="companyLogo"> 19 19 <image texture="pregame/shell/logo/wfg_logo_white.png" … … 66 66 <!-- Top border --> 67 67 <image backcolor="60 60 40" 68 size="0 0 100%-1 1" 68 size="0 0 100%-1 1" 69 69 /> 70 70 <!-- Right border --> … … 78 78 <!-- Left border --> 79 79 <image backcolor="60 60 40" 80 size="0 0 1 100%-1" 80 size="0 0 1 100%-1" 81 81 /> 82 82 <!-- middle --> … … 118 118 size="0 0 2 100%" 119 119 />--> 120 120 121 121 <!-- top --> 122 122 <image backcolor="230 190 80" 123 123 size="2 0 100%-2 2" 124 124 /> 125 125 126 126 <!-- bottom --> 127 127 <image backcolor="230 190 80" 128 128 size="2 100%-2 100%-2 100%" 129 129 /> 130 130 131 131 <!-- left --> 132 132 <image backcolor="230 190 80" … … 134 134 /> 135 135 </sprite> 136 136 137 137 <!-- MainMenuPanelRightBorder --> 138 138 <sprite name="MainMenuPanelRightBorder"> … … 142 142 /> 143 143 </sprite> 144 144 145 145 <!-- SubmenuPanel --> 146 146 <sprite name="SubmenuPanel"> … … 217 217 real_texture_placement="0 0 312 312" 218 218 texture_size="0 0 256 256" 219 size="4 4 100%-4 100%-4" 219 size="4 4 100%-4 100%-4" 220 220 /> 221 221 … … 263 263 <image texture="global/tile/stone_background.png" 264 264 texture_size="0 0 512 512" 265 size="4 4 100%-4 100%-4" 265 size="4 4 100%-4 100%-4" 266 266 /> 267 267 … … 309 309 <image texture="global/tile/stone_background.png" 310 310 texture_size="0 0 512 512" 311 size="4 4 100%-4 100%-4" 311 size="4 4 100%-4 100%-4" 312 312 /> 313 313 … … 354 354 <image texture="global/tile/stone_background_light.png" 355 355 texture_size="0 0 512 512" 356 size="4 4 100%-4 100%-4" 357 /> 358 356 size="4 4 100%-4 100%-4" 357 /> 358 359 <!-- shading --> 360 <image 361 texture="global/shading/gradient_wide.png" 362 size="0 0 100% 100%" 363 /> 364 359 365 <!-- thin sides --> 360 366 <image texture="global/border/line_horiz.png" … … 374 380 size="16 20 20 100%-20" 375 381 /> 376 382 377 383 <!-- thin corners --> 378 384 <image … … 392 398 texture_size="0 0 4 4" 393 399 size="16 16 20 20" 394 />395 396 <!-- shading -->397 <image398 texture="global/shading/gradient_wide.png"399 size="0 0 100% 100%"400 400 /> 401 401 … … 445 445 <image texture="global/titlebar/titlebar_middle.png" 446 446 real_texture_placement="0 0 64 32" 447 size="50%-64 0 50%+64 32" 447 size="50%-64 0 50%+64 32" 448 448 /> 449 449 <image texture="global/titlebar/titlebar_right.png" … … 458 458 ========================================== 459 459 --> 460 460 461 461 <sprite name="StoneButton"> 462 462 <image texture="global/button/button_stone_unselected.png" 463 463 real_texture_placement="0 0 256 28" 464 size="0 0 100% 100%" 465 /> 466 </sprite> 467 464 size="0 0 100% 100%" 465 /> 466 </sprite> 467 468 468 <sprite name="StoneButtonOver"> 469 469 <image texture="global/button/button_stone_selected.png" 470 470 real_texture_placement="0 0 256 28" 471 size="0 0 100% 100%" 471 size="0 0 100% 100%" 472 472 /> 473 473 </sprite> … … 477 477 <image texture="global/button/button_stone_selected.png" 478 478 real_texture_placement="0 0 256 28" 479 size="0 0 100% 100%" 479 size="0 0 100% 100%" 480 480 /> 481 481 </sprite> … … 484 484 <image texture="global/button/button_stone_selected.png" 485 485 real_texture_placement="0 0 256 28" 486 size="0 0 100% 100%" 486 size="0 0 100% 100%" 487 487 /> 488 488 <image texture="global/button/button_stone_selected_left_trim.png" 489 489 real_texture_placement="0 0 32 28" 490 size="0 0 32 28" 490 size="0 0 32 28" 491 491 /> 492 492 <image texture="global/button/button_stone_selected_right_trim.png" 493 493 real_texture_placement="0 0 32 28" 494 size="100%-32 0 100% 28" 494 size="100%-32 0 100% 28" 495 495 /> 496 496 </sprite> … … 500 500 <image texture="global/button/button_stone_selected.png" 501 501 real_texture_placement="0 0 256 28" 502 size="0 0 100% 100%" 502 size="0 0 100% 100%" 503 503 /> 504 504 <image texture="global/button/button_stone_selected_left_trim.png" 505 505 real_texture_placement="0 0 32 28" 506 size="0 0 32 28" 506 size="0 0 32 28" 507 507 /> 508 508 <image texture="global/button/button_stone_selected_right_trim.png" 509 509 real_texture_placement="0 0 32 28" 510 size="100%-32 0 100% 28" 510 size="100%-32 0 100% 28" 511 511 /> 512 512 </sprite> … … 516 516 <image texture="global/button/button_stone_unselected.png" 517 517 real_texture_placement="0 0 256 28" 518 size="0 0 100% 100%" 518 size="0 0 100% 100%" 519 519 /> 520 520 </sprite> … … 522 522 <sprite name="StoneCheckBoxOpen"> 523 523 <image texture="global/button/checkbox_open_gray.dds" 524 size="0 0 100% 100%" 524 size="0 0 100% 100%" 525 525 /> 526 526 </sprite> … … 528 528 <sprite name="StoneCheckBoxTick"> 529 529 <image texture="global/button/checkbox_tick_gray.dds" 530 size="0 0 100% 100%" 530 size="0 0 100% 100%" 531 531 /> 532 532 </sprite> … … 534 534 <sprite name="StoneCheckBoxCross"> 535 535 <image texture="global/button/checkbox_cross_gray.dds" 536 size="0 0 100% 100%" 536 size="0 0 100% 100%" 537 537 /> 538 538 </sprite> … … 540 540 <sprite name="StoneCheckBoxCrossOver"> 541 541 <image texture="global/button/checkbox_cross_over_gray.dds" 542 size="0 0 100% 100%" 542 size="0 0 100% 100%" 543 543 /> 544 544 </sprite> … … 546 546 <sprite name="StoneArrowLeft"> 547 547 <image texture="global/button/arrowbox_lt.png" 548 size="0 0 100% 100%" 548 size="0 0 100% 100%" 549 549 /> 550 550 </sprite> … … 552 552 <sprite name="StoneArrowLeftOver"> 553 553 <image texture="global/button/arrowbox_lt_over.png" 554 size="0 0 100% 100%" 554 size="0 0 100% 100%" 555 555 /> 556 556 </sprite> … … 558 558 <sprite name="StoneArrowRight"> 559 559 <image texture="global/button/arrowbox_rt.png" 560 size="0 0 100% 100%" 560 size="0 0 100% 100%" 561 561 /> 562 562 </sprite> … … 564 564 <sprite name="StoneArrowRightOver"> 565 565 <image texture="global/button/arrowbox_rt_over.png" 566 size="0 0 100% 100%" 566 size="0 0 100% 100%" 567 567 /> 568 568 </sprite> … … 570 570 <sprite name="StoneArrowUp"> 571 571 <image texture="global/button/arrowbox_up.dds" 572 size="0 0 100% 100%" 572 size="0 0 100% 100%" 573 573 /> 574 574 </sprite> … … 576 576 <sprite name="StoneArrowUpOver"> 577 577 <image texture="global/button/arrowbox_up_over.dds" 578 size="0 0 100% 100%" 578 size="0 0 100% 100%" 579 579 /> 580 580 </sprite> … … 582 582 <sprite name="StoneArrowDn"> 583 583 <image texture="global/button/arrowbox_dn.dds" 584 size="0 0 100% 100%" 584 size="0 0 100% 100%" 585 585 /> 586 586 </sprite> … … 588 588 <sprite name="StoneArrowDnOver"> 589 589 <image texture="global/button/arrowbox_dn_over.dds" 590 size="0 0 100% 100%" 591 /> 592 </sprite> 593 590 size="0 0 100% 100%" 591 /> 592 </sprite> 593 594 594 <sprite name="StoneScrollSpriteBar"> 595 595 <image texture="global/border/scrollbar.dds" 596 596 real_texture_placement="0 0 16 128" 597 size="0 0 100% 100%" 597 size="0 0 100% 100%" 598 598 /> 599 599 </sprite> -
ps/trunk/binaries/data/mods/public/gui/common/common_styles.xml
r10130 r10155 88 88 /> 89 89 90 <style name="SmallTitleText"91 font="serif- 9"90 <style name="MediumTitleText" 91 font="serif-bold-12" 92 92 textcolor="white" 93 93 text_align="center" -
ps/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.xml
r10150 r10155 171 171 >[Tooltip text]</object> 172 172 173 <!-- Start Button --> 174 <object 175 name="startGame" 176 type="button" 177 style="StoneButton" 178 size="100%-304 100%-48 100%-164 100%-20" 179 tooltip_style="onscreenToolTip" 180 tooltip="Click this button to start a new game with the current settings." 181 >Start game! 182 <action on="Press">launchGame();</action> 183 </object> 184 173 185 <!-- Cancel Button --> 174 186 <object … … 176 188 type="button" 177 189 style="StoneButton" 178 size="100%-304 100%-48 100%-164100%-20"190 size="100%-160 100%-48 100%-20 100%-20" 179 191 tooltip_style="onscreenToolTip" 180 192 tooltip="Click this button to return to the main menu." … … 186 198 </object> 187 199 188 <!-- Start Button -->189 <object190 name="startGame"191 type="button"192 style="StoneButton"193 size="100%-160 100%-48 100%-20 100%-20"194 tooltip_style="onscreenToolTip"195 tooltip="Click this button to start a new game with the current settings."196 >Start game!197 <action on="Press">launchGame();</action>198 </object>199 200 200 </object> 201 201 -
ps/trunk/binaries/data/mods/public/gui/loading/loading.js
r9336 r10155 4 4 { 5 5 g_Data = data; 6 6 7 7 // Set to "hourglass" cursor. 8 8 setCursor("cursor-wait"); … … 16 16 var tipTextFilePath = tipTextLoadingArray[getRandom (0, tipTextLoadingArray.length-1)]; 17 17 var tipText = readFile(tipTextFilePath); 18 18 19 19 if (tipText) 20 20 { … … 40 40 // happen until the first timeslice completes, so set initial values. 41 41 var loadingMapName = getGUIObjectByName ("loadingMapName"); 42 42 43 43 if (data) 44 44 { … … 70 70 function displayProgress() 71 71 { 72 const END_PIECE_WIDTH = 16; 73 72 74 getGUIObjectByName("progressbar").caption = g_Progress; // display current progress 73 75 getGUIObjectByName("progressText").caption = g_LoadDescription; // display current progess details 74 76 75 77 // Keep curved right edge of progress bar in sync with the rest of the progress bar 76 78 var middle = getGUIObjectByName("progressbar"); 77 79 var rightSide = getGUIObjectByName("progressbar_right"); 78 79 var middleLength = middle.size.right - middle.size.left;80 81 var middleLength = (middle.size.right - middle.size.left) - (END_PIECE_WIDTH / 2); 80 82 var increment = Math.round(g_Progress*middleLength/100); 81 83 82 84 var size = rightSide.size; 83 85 size.left = increment; 84 size.right = increment +12;86 size.right = increment + END_PIECE_WIDTH; 85 87 rightSide.size = size; 86 88 } … … 98 100 // Switch GUI from loading screen to game session. 99 101 Engine.SwitchGuiPage("page_session.xml", g_Data); 100 102 101 103 // Restore default cursor. 102 104 setCursor("arrow-default"); -
ps/trunk/binaries/data/mods/public/gui/loading/loading.xml
r10108 r10155 13 13 <!-- LOADING SCREEN BACKGROUND --> 14 14 <object type="image" style="StonePanelLight"/> 15 15 16 16 <object size="50%-400 30 50%+400 150"> 17 17 <object name="loadingMapName" size="0 0 100% 32" type="text" style="loadingPageTitleText"/> 18 18 19 19 <!-- LOADING SCREEN progressbar --> 20 20 <object size="50%-256 48 50%+256 80" type="image" sprite="loadingProgressBarBackground"> … … 24 24 size="56 5 456 100%-5" 25 25 > 26 <object name="progressbar_left" size=" 0%-12 0 0100%" type="image" sprite="loadingProgressbar_left"/>27 <object name="progressbar_right" size=" 0 0 12100%" type="image" sprite="loadingProgressbar_right"/>26 <object name="progressbar_left" size="-8 0 8 100%" type="image" sprite="loadingProgressbar_left"/> 27 <object name="progressbar_right" size="8 0 24 100%" type="image" sprite="loadingProgressbar_right"/> 28 28 <action on="Progress">displayProgress();</action> 29 29 </object> 30 30 </object> 31 31 32 32 <!-- LOADING SCREEN TEXT --> 33 33 <object name="progressText" size="0 64 100% 100%" type="text" style="loadingBarText"/> 34 34 </object> 35 35 36 36 <!-- LOADING SCREEN TIP IMAGE--> 37 37 <object size="50%-452 50%-196 50%+68 50%+196" type="image" sprite="loadingTipImage"> -
ps/trunk/binaries/data/mods/public/gui/loading/sprites.xml
r10085 r10155 61 61 <image 62 62 texture="loading/progressbar/progressbar_background_left.png" 63 size="0%+0 0% 64 0%+32" 63 size="0%+0 0% 64 0%+32" 64 64 /> 65 65 <image 66 66 texture="loading/progressbar/progressbar_background_middle.png" 67 size="64 0% 100%-64 0%+32" 67 size="64 0% 100%-64 0%+32" 68 68 /> 69 69 <image 70 70 texture="loading/progressbar/progressbar_background_right.png" 71 size="100%-64 0% 100%+0 0%+32" 71 size="100%-64 0% 100%+0 0%+32" 72 72 /> 73 73 </sprite> … … 77 77 <image 78 78 texture="loading/progressbar/progressbar_left.png" 79 real_texture_placement=" 0 0 12 20"80 size="0 0 100% 100%" 79 real_texture_placement="16 6 32 26" 80 size="0 0 100% 100%" 81 81 /> 82 82 </sprite> … … 84 84 <image 85 85 texture="loading/progressbar/progressbar_middle.png" 86 real_texture_placement="0 0 1 20"86 real_texture_placement="0 6 1 26" 87 87 size="0 0 100% 100%" 88 88 /> … … 91 91 <image 92 92 texture="loading/progressbar/progressbar_right.png" 93 real_texture_placement=" 4 0 16 20"94 size="0 0 100% 100%" 93 real_texture_placement="0 6 16 26" 94 size="0 0 100% 100%" 95 95 /> 96 96 </sprite> … … 142 142 /> 143 143 </sprite> 144 144 145 145 <!-- TIP IMAGE GRADIENT --> 146 146 <sprite name="loadingTipImageCover"> -
ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.js
r10146 r10155 114 114 function updateMenuPosition() 115 115 { 116 if (getGUIObjectByName("submenuScreen").hidden == false) 116 var submenu = getGUIObjectByName("submenu"); 117 118 if (submenu.hidden == false) 117 119 { 118 var submenu = getGUIObjectByName("submenu");119 120 120 // The offset is the increment or number of units/pixels to move 121 121 // the menu. An offset of one is always accurate, but it is too … … 125 125 // example is 300-60 = 240. We choose an offset of 5 because it 126 126 // divides into 240 evenly and provided the speed we wanted. 127 var OFFSET = 5;127 var OFFSET = 10; 128 128 129 129 if (submenu.size.left < getGUIObjectByName("mainMenu").size.right) … … 137 137 function openMenu(newSubmenu, position, buttonHeight, numButtons) 138 138 { 139 // remove old submenu 140 getGUIObjectByName(currentSubmenu).hidden = true; 141 142 // switch to new submenu 139 var menuSound = new Sound("audio/attack/weapon/arrowfly_24.ogg"); 140 if (menuSound) 141 { 142 menuSound.play(0); 143 } 144 145 // switch to new submenu type 143 146 currentSubmenu = newSubmenu; 144 147 getGUIObjectByName(currentSubmenu).hidden = false; … … 154 157 155 158 // prepare to hide the submenu when the mouse moves off of the submenu 156 getGUIObjectByName("submenuScreen").hidden = false; 157 getGUIObjectByName("secondarySubmenuScreen").hidden = false; 159 getGUIObjectByName("submenu").hidden = false; 158 160 } 159 161 … … 161 163 function closeMenu() 162 164 { 163 getGUIObjectByName("submenuScreen").hidden = true; 164 getGUIObjectByName("secondarySubmenuScreen").hidden = true; 165 // remove old submenu type 166 getGUIObjectByName(currentSubmenu).hidden = true; 167 168 // hide submenu 169 getGUIObjectByName("submenu").hidden = true; 170 171 // reset submenu position 165 172 getGUIObjectByName("submenu").size = getGUIObjectByName("mainMenu").size; 173 174 // reset main menu panel right border 166 175 getGUIObjectByName("MainMenuPanelRightBorderTop").size = "100%-2 0 100% 100%"; 167 176 } -
ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.xml
r10146 r10155 152 152 ========================================== 153 153 --> 154 <object name="submenuScreen" 155 type="image" 154 155 <!-- submenu --> 156 <object name="submenu" 157 type="image" 158 style="SubmenuPanel" 159 size="60 50%-100 300 50%+100" 156 160 hidden="true" 157 161 > 158 <!-- hides the submenu when the mouse leaves the mainMenuButtons or submenu --> 159 <action on="MouseEnter"> 160 closeMenu(); 161 </action> 162 163 <!-- submenu --> 164 <object name="submenu" 162 <!-- submenuSinglePlayer --> 163 <object name="submenuSinglePlayer" 165 164 type="image" 166 style="SubmenuPanel" 167 size="60 50%-100 300 50%+100" 165 size="0 4 100%-4 100%-4" 166 tooltip_style="pgToolTip" 167 tooltip="The 0 A.D. Game Manual." 168 hidden="true" 168 169 > 169 < !-- submenuSinglePlayer -->170 <object name="submenuSinglePlayer"171 type="image"172 size="0 4 100%-4 100%-4"170 <object name="subMenuSinglePlayerButton" 171 type="button" 172 style="StoneButtonFancy" 173 size="0 0 100% 28" 173 174 tooltip_style="pgToolTip" 174 tooltip="The 0 A.D. Game Manual." 175 hidden="true" 175 tooltip="Click here to start a new single player game." 176 176 > 177 <object name="subMenuSinglePlayerButton" 178 type="button" 179 style="StoneButtonFancy" 180 size="0 0 100% 28" 181 tooltip_style="pgToolTip" 182 tooltip="Click here to start a new single player game." 183 > 184 Matches 185 <action on="Press"> 186 closeMenu(); 187 Engine.PushGuiPage("page_gamesetup.xml", { type: "offline" }); 188 </action> 189 </object> 190 191 <object name="subMenuCampaignButton" 192 type="button" 193 style="StoneButtonFancy" 194 size="0 32 100% 60" 195 tooltip_style="pgToolTip" 196 tooltip="Relive history through historical military campaigns. [NOT YET IMPLEMENTED]" 197 enabled="false" 198 > 199 Campaigns 200 <action on="Press"> 201 closeMenu(); 202 <![CDATA[ 203 // Open Campaigns window. 204 // NOT IMPLEMENTED YET 205 ]]> 206 </action> 207 </object> 177 Matches 178 <action on="Press"> 179 closeMenu(); 180 Engine.PushGuiPage("page_gamesetup.xml", { type: "offline" }); 181 </action> 208 182 </object> 209 183 210 < !-- submenuMultiplayer -->211 <object name="submenuMultiplayer"212 type="image"213 size="0 4 100%-4 100%-4"214 tooltip_style="pgToolTip"215 tooltip="The 0 A.D. Game Manual"216 hidden="true"184 <object name="subMenuCampaignButton" 185 type="button" 186 style="StoneButtonFancy" 187 size="0 32 100% 60" 188 tooltip_style="pgToolTip" 189 tooltip="Relive history through historical military campaigns. [NOT YET IMPLEMENTED]" 190 enabled="false" 217 191 > 218 <object name="subMenuMultiplayerJoinButton" 219 type="button" 220 style="StoneButtonFancy" 221 size="0 0 100% 28" 222 tooltip_style="pgToolTip" 223 tooltip="Joining an existing multiplayer game." 224 > 225 Join Game 226 <action on="Press"> 227 closeMenu(); 228 // Open Multiplayer connection window with join option. 229 Engine.PushGuiPage("page_gamesetup_mp.xml", "join"); 230 </action> 231 </object> 232 233 <object name="subMenuMultiplayerHostButton" 234 type="button" 235 style="StoneButtonFancy" 236 size="0 32 100% 60" 237 tooltip_style="pgToolTip" 238 tooltip="Host a multiplayer game." 239 > 240 Host Game 241 <action on="Press"> 242 closeMenu(); 243 // Open Multiplayer connection window with host option. 244 Engine.PushGuiPage("page_gamesetup_mp.xml", "host"); 245 </action> 246 </object> 247 192 Campaigns 193 <action on="Press"> 194 closeMenu(); 195 <![CDATA[ 196 // Open Campaigns window. 197 // NOT IMPLEMENTED YET 198 ]]> 199 </action> 248 200 </object> 249 250 <!-- submenuToolsAndOptions --> 251 <object name="submenuToolsAndOptions" 252 type="image" 253 size="0 4 100%-4 100%-4" 201 </object> 202 203 <!-- submenuMultiplayer --> 204 <object name="submenuMultiplayer" 205 type="image" 206 size="0 4 100%-4 100%-4" 207 tooltip_style="pgToolTip" 208 tooltip="The 0 A.D. Game Manual" 209 hidden="true" 210 > 211 <object name="subMenuMultiplayerJoinButton" 212 type="button" 213 style="StoneButtonFancy" 214 size="0 0 100% 28" 254 215 tooltip_style="pgToolTip" 255 tooltip="The 0 A.D. Game Manual" 256 hidden="true" 216 tooltip="Joining an existing multiplayer game." 257 217 > 258 <object name="submenuOptionsButton" 259 style="StoneButtonFancy" 260 type="button" 261 size="0 0 100% 28" 262 tooltip_style="pgToolTip" 263 tooltip="Adjust game settings. [NOT YET IMPLEMENTED]" 264 enabled="false" 265 > 266 Options 267 <action on="Press"> 268 closeMenu(); 269 <![CDATA[ 270 // Open Options window. 271 Engine.PushGuiPage("page_options.xml"); 272 ]]> 273 </action> 274 </object> 275 276 <object name="submenuEditorButton" 277 style="StoneButtonFancy" 278 type="button" 279 size="0 32 100% 60" 280 tooltip_style="pgToolTip" 281 tooltip="Open the Atlas Scenario Editor in a new window. You can run this more reliably by starting the game with the command-line argument "-editor"." 282 > 283 Scenario Editor 284 <action on="Press"> 285 closeMenu(); 286 <![CDATA[ 287 // Start Atlas 288 if (Engine.AtlasIsAvailable()) 289 Engine.RestartInAtlas(); 290 else 291 messageBox(400, 200, "The scenario editor is not available or failed to load.", "Error", 2); 292 ]]> 293 </action> 294 </object> 218 Join Game 219 <action on="Press"> 220 closeMenu(); 221 // Open Multiplayer connection window with join option. 222 Engine.PushGuiPage("page_gamesetup_mp.xml", "join"); 223 </action> 295 224 </object> 296 </object><!-- end of submenu --> 297 </object><!-- end of submenu screen --> 225 226 <object name="subMenuMultiplayerHostButton" 227 type="button" 228 style="StoneButtonFancy" 229 size="0 32 100% 60" 230 tooltip_style="pgToolTip" 231 tooltip="Host a multiplayer game." 232 > 233 Host Game 234 <action on="Press"> 235 closeMenu(); 236 // Open Multiplayer connection window with host option. 237 Engine.PushGuiPage("page_gamesetup_mp.xml", "host"); 238 </action> 239 </object> 240 241 </object> 242 243 <!-- submenuToolsAndOptions --> 244 <object name="submenuToolsAndOptions" 245 type="image" 246 size="0 4 100%-4 100%-4" 247 tooltip_style="pgToolTip" 248 tooltip="The 0 A.D. Game Manual" 249 hidden="true" 250 > 251 <object name="submenuOptionsButton" 252 style="StoneButtonFancy" 253 type="button" 254 size="0 0 100% 28" 255 tooltip_style="pgToolTip" 256 tooltip="Adjust game settings. [NOT YET IMPLEMENTED]" 257 enabled="false" 258 > 259 Options 260 <action on="Press"> 261 closeMenu(); 262 <![CDATA[ 263 // Open Options window. 264 Engine.PushGuiPage("page_options.xml"); 265 ]]> 266 </action> 267 </object> 268 269 <object name="submenuEditorButton" 270 style="StoneButtonFancy" 271 type="button" 272 size="0 32 100% 60" 273 tooltip_style="pgToolTip" 274 tooltip="Open the Atlas Scenario Editor in a new window. You can run this more reliably by starting the game with the command-line argument "-editor"." 275 > 276 Scenario Editor 277 <action on="Press"> 278 closeMenu(); 279 <![CDATA[ 280 // Start Atlas 281 if (Engine.AtlasIsAvailable()) 282 Engine.RestartInAtlas(); 283 else 284 messageBox(400, 200, "The scenario editor is not available or failed to load.", "Error", 2); 285 ]]> 286 </action> 287 </object> 288 </object> 289 </object><!-- end of submenu --> 298 290 299 291 … … 309 301 z="50" 310 302 > 311 <!-- These hides the submenu if you move the mouse over312 the main menu panel. The regular submenu screen canot313 handle this because it must be below the main menu panel314 in order for the submenu to slide out from behind the315 main menu panel. -->316 <object name="secondarySubmenuScreen"317 type="image"318 hidden="true"319 size="0 0 100% 100%"320 >321 <!-- hides the submenu when the mouse leaves the mainMenuButtons or submenu -->322 <action on="MouseEnter">323 closeMenu();324 </action>325 </object>326 327 303 <!-- These are used to make the right side blend in with the submenu --> 328 304 <object name="MainMenuPanelRightBorderTop" … … 351 327 ghost="false" 352 328 > 353 <!-- Allows sliding the mouse over to the submenu.354 Without this, the submenu will close automatically355 when the mouse encounters the "secondarySubmenuScreen"356 in the thin space between the main menu buttons357 and the submenu buttons. -->358 <object359 type="image"360 size="100% 0 100%+8 100%"361 ghost="false"362 />363 364 329 <!-- LEARN TO PLAY BUTTON --> 365 330 <object name="menuLearnToPlayButton" … … 528 493 <!-- COMPANY NAME --> 529 494 <object type="text" 530 style=" SmallTitleText"495 style="MediumTitleText" 531 496 ghost="true" 532 497 size="50%-128 32 50%+128 48" … … 537 502 <object name="versionNumber" 538 503 type="text" 539 style=" SmallTitleText"504 style="MediumTitleText" 540 505 ghost="true" 541 506 size="50%-128 100%-36 50%+128 100%" -
ps/trunk/binaries/data/mods/public/gui/session/menu.js
r10147 r10155 7 7 8 8 // Includes the main menu button 9 const NUM_BUTTONS = 5;9 const NUM_BUTTONS = 6; 10 10 11 11 // Regular menu buttons … … 16 16 17 17 // Menu starting position - bottom 18 const MENU_BOTTOM = 36;18 const MENU_BOTTOM = 36; 19 19 20 20 // Menu starting position - top … … 22 22 23 23 // Menu starting position - overall 24 const INITIAL_MENU_POSITION = "100%- " + END_MENU_POSITION + "" + MENU_TOP + " 100% " + MENU_BOTTOM;24 const INITIAL_MENU_POSITION = "100%-164 " + MENU_TOP + " 100% " + MENU_BOTTOM; 25 25 26 26 … … 28 28 function updateMenuPosition() 29 29 { 30 if (getGUIObjectByName("menu Screen").hidden == false)30 if (getGUIObjectByName("menu").hidden == false) 31 31 { 32 32 var menu = getGUIObjectByName("menu"); … … 37 37 // in order for the menu to end up at the right spot. The travel 38 38 // distance is the max-initial. The travel distance in this 39 // example is 1 64-36 = 128. We choose an offset of 8because it40 // divides into 1 28evenly and provided the speed we wanted.41 var OFFSET = 8;39 // example is 196-36 = 160. We choose an offset of 16 because it 40 // divides into 160 evenly and provided the speed we wanted. 41 var OFFSET = 16; 42 42 43 43 if (menu.size.bottom < END_MENU_POSITION) 44 44 { 45 menu.size = "100%- " + END_MENU_POSITION + "" + (menu.size.top + OFFSET) + " 100% " + (menu.size.bottom + OFFSET);45 menu.size = "100%-164 " + (menu.size.top + OFFSET) + " 100% " + (menu.size.bottom + OFFSET); 46 46 } 47 47 } … … 51 51 function openMenu() 52 52 { 53 getGUIObjectByName("menuScreen").hidden = false; 53 var menuSound = new Sound("audio/interface/ui/ui_button_longclick.ogg"); 54 if (menuSound) 55 { 56 menuSound.play(0); 57 } 58 59 getGUIObjectByName("menu").hidden = false; 54 60 } 55 61 … … 57 63 function closeMenu() 58 64 { 59 getGUIObjectByName("menu Screen").hidden = true;65 getGUIObjectByName("menu").hidden = true; 60 66 getGUIObjectByName("menu").size = INITIAL_MENU_POSITION; 61 67 } -
ps/trunk/binaries/data/mods/public/gui/session/session.xml
r10147 r10155 353 353 <!-- Menu --> 354 354 <!-- ================================ ================================ --> 355 <object name="menuScreen" 356 type="image" 355 <object name="menu" 356 style="StonePanelThinBorder" 357 type="image" 358 size="100%-164 -160 100% 36" 357 359 hidden="true" 358 size="0 0 100% 100%"359 360 > 360 <!-- hides the menu when the mouse leaves the menu --> 361 <action on="MouseEnter"> 362 closeMenu(); 363 </action> 364 365 <object name="menu" 366 style="StonePanelThinBorder" 367 type="image" 368 size="100%-164 -128 100% 36" 369 > 370 <object size="4 36 100%-4 50%+20"> 371 372 <!-- Settings button --> 373 <object type="button" 374 name="settingsButton" 375 style="StoneButtonFancy" 376 size="0 0 100% 28" 377 tooltip_style="sessionToolTip" 378 > 379 Settings 380 <action on="Press"> 381 closeMenu(); 382 openSettings(); 383 </action> 384 </object> 385 386 <!-- Chat button --> 387 <object type="button" 388 name="chatButton" 389 style="StoneButtonFancy" 390 size="0 32 100% 60" 391 tooltip_style="sessionToolTip" 392 > 393 Chat 394 <action on="Press"> 395 closeMenu(); 396 openChat(); 397 </action> 398 </object> 399 400 <!-- Pause Button --> 401 <object type="button" 402 name="pauseButton" 403 style="StoneButtonFancy" 404 size="0 64 100% 92" 405 tooltip_style="sessionToolTip" 406 > 407 <object name="pauseButtonText" type="text" style="CenteredButtonText" ghost="true">Pause</object> 408 <action on="Press"> 409 closeMenu(); 410 togglePause(); 411 </action> 412 </object> 413 414 <!-- Exit button --> 415 <object type="button" 416 name="menuExitButton" 417 style="StoneButtonFancy" 418 size="0 96 100% 124" 419 tooltip_style="sessionToolTip" 420 > 421 Exit 422 <action on="Press"> 423 closeMenu(); 424 closeOpenDialogs(); 425 <![CDATA[ 426 var btCaptions = ["Yes", "No"]; 427 var btCode = [leaveGame, null]; 428 messageBox(400, 200, "Are you sure you want to quit?", "Confirmation", 0, btCaptions, btCode); 429 ]]> 430 </action> 431 </object> 361 <object size="4 36 100%-4 50%+20"> 362 363 <!-- Settings button --> 364 <object type="button" 365 name="settingsButton" 366 style="StoneButtonFancy" 367 size="0 0 100% 28" 368 tooltip_style="sessionToolTip" 369 > 370 Settings 371 <action on="Press"> 372 closeMenu(); 373 openSettings(); 374 </action> 375 </object> 376 377 <!-- Chat button --> 378 <object type="button" 379 name="chatButton" 380 style="StoneButtonFancy" 381 size="0 32 100% 60" 382 tooltip_style="sessionToolTip" 383 > 384 Chat 385 <action on="Press"> 386 closeMenu(); 387 openChat(); 388 </action> 389 </object> 390 391 <!-- Pause Button --> 392 <object type="button" 393 name="pauseButton" 394 style="StoneButtonFancy" 395 size="0 64 100% 92" 396 tooltip_style="sessionToolTip" 397 > 398 <object name="pauseButtonText" type="text" style="CenteredButtonText" ghost="true">Pause</object> 399 <action on="Press"> 400 closeMenu(); 401 togglePause(); 402 </action> 403 </object> 404 405 <!-- Exit button --> 406 <object type="button" 407 name="menuExitButton" 408 style="StoneButtonFancy" 409 size="0 96 100% 124" 410 tooltip_style="sessionToolTip" 411 > 412 Exit 413 <action on="Press"> 414 closeMenu(); 415 closeOpenDialogs(); 416 <![CDATA[ 417 var btCaptions = ["Yes", "No"]; 418 var btCode = [leaveGame, null]; 419 messageBox(400, 200, "Are you sure you want to quit?", "Confirmation", 0, btCaptions, btCode); 420 ]]> 421 </action> 422 </object> 423 424 <!-- Exit button --> 425 <object type="button" 426 name="menuCloseButton" 427 style="StoneButtonFancy" 428 size="0 128 100% 156" 429 tooltip_style="sessionToolTip" 430 > 431 Close 432 <action on="Press"> 433 closeMenu(); 434 </action> 432 435 </object> 433 436 </object>
Note:
See TracChangeset
for help on using the changeset viewer.
