- Timestamp:
- 08/28/11 03:28:50 (13 years ago)
- Location:
- ps/trunk/binaries/data/mods/public/gui
- Files:
-
- 4 edited
-
common/common_sprites.xml (modified) (2 diffs)
-
common/common_styles.xml (modified) (1 diff)
-
pregame/mainmenu.js (modified) (2 diffs)
-
pregame/mainmenu.xml (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/binaries/data/mods/public/gui/common/common_sprites.xml
r10111 r10119 106 106 107 107 <!-- sides --> 108 <image backcolor="230 190 80"108 <!-- <image backcolor="230 190 80" 109 109 size="2 0 100%-2 2" 110 110 /> … … 117 117 <image backcolor="230 190 80" 118 118 size="0 0 2 100%" 119 /> 119 />--> 120 121 <!-- top --> 122 <image backcolor="230 190 80" 123 size="2 0 100%-2 2" 124 /> 125 126 <!-- bottom --> 127 <image backcolor="230 190 80" 128 size="2 100%-2 100%-2 100%" 129 /> 130 131 <!-- left --> 132 <image backcolor="230 190 80" 133 size="0 0 2 100%" 134 /> 135 </sprite> 136 137 <!-- MainMenuPanelRightBorder --> 138 <sprite name="MainMenuPanelRightBorder"> 139 <!-- right --> 140 <image backcolor="230 190 80" 141 size="0 0 100% 100%" 142 /> 143 </sprite> 144 145 <!-- SubmenuPanel --> 146 <sprite name="SubmenuPanel"> 147 <image texture="global/tile/stone_background.png" 148 real_texture_placement="28 0 292 264" 149 texture_size="0 0 240 240" 150 /> 151 152 <image texture="pregame/shading/menu_panel_background_shading.png" 153 texture_size="0 0 100% 100%" 154 size="0 0 100% 100%" 155 /> 156 157 <!-- sides --> 158 <image backcolor="230 190 80" 159 size="0 0 100%-2 2" 160 /> 161 <image backcolor="230 190 80" 162 size="100%-2 0 100% 100%" 163 /> 164 <image backcolor="230 190 80" 165 size="0 100%-2 100%-2 100%" 166 /> 167 <!-- no left border here --> 120 168 </sprite> 121 169 -
ps/trunk/binaries/data/mods/public/gui/common/common_styles.xml
r10108 r10119 136 136 <style name="MainMenuPanel" 137 137 sprite="MainMenuPanel" 138 buffer_zone="10" 139 text_align="left" 140 text_valign="top" 141 /> 142 143 <style name="SubmenuPanel" 144 sprite="SubmenuPanel" 138 145 buffer_zone="10" 139 146 text_align="left" -
ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.js
r10108 r10119 101 101 } 102 102 103 104 105 106 const MARGIN = 4; 107 108 // Sizes right border on main menu panel to match the submenu 109 function blendSubmenuIntoMain(topPosition, bottomPosition) 110 { 111 var topSprite = getGUIObjectByName("MainMenuPanelRightBorderTop"); 112 topSprite.size = "100%-2 0 100% " + (topPosition + MARGIN); 113 console.write(topSprite.size); 114 115 var bottomSprite = getGUIObjectByName("MainMenuPanelRightBorderBottom"); 116 bottomSprite.size = "100%-2 " + (bottomPosition) + " 100% 100%"; 117 } 118 103 119 // Update the submenu 104 120 function updateSubmenu(newSubmenu, position, buttonHeight, numButtons) 105 121 { 106 const MARGIN = 4;107 108 122 // remove old submenu 109 123 getGUIObjectByName(currentSubmenu).hidden = true; … … 120 134 submenu.hidden = false; 121 135 136 // Blend in right border of main menu into the left border of the submenu 137 blendSubmenuIntoMain(top, bottom); 138 122 139 // prepare to hide the submenu when the mouse moves off of the submenu 123 140 getGUIObjectByName("submenuScreen").hidden = false; -
ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.xml
r10114 r10119 153 153 ========================================== 154 154 --> 155 <object 156 type="image" 155 <object type="image" 157 156 style="MainMenuPanel" 158 157 size="60 -2 300 100%+2" 159 160 158 > 159 <!-- These are used to make the right side blend in with the submenu --> 160 <object name="MainMenuPanelRightBorderTop" 161 type="image" 162 sprite="MainMenuPanelRightBorder" 163 ghost="true" 164 size="100%-2 0 100% 100%" 165 /> 166 <object name="MainMenuPanelRightBorderBottom" 167 type="image" 168 sprite="MainMenuPanelRightBorder" 169 ghost="true" 170 size="100%-2 0 100% 100%" 171 /> 172 161 173 <object name="productLogo" 162 174 type="image" … … 380 392 <!-- hides the submenu when the mouse leaves the mainMenuButtons or submenu --> 381 393 <action on="MouseEnter"> 382 <![CDATA[getGUIObjectByName("submenu").hidden = true;]]> 394 getGUIObjectByName("submenu").hidden = true; 395 getGUIObjectByName("MainMenuPanelRightBorderTop").size = "100%-2 0 100% 100%"; 383 396 </action> 384 397 … … 386 399 <object name="submenu" 387 400 type="image" 388 style=" MainMenuPanel"389 size=" 298 50%-100 53850%+100"401 style="SubmenuPanel" 402 size="300 50%-100 536 50%+100" 390 403 > 391 404 <!-- submenuSinglePlayer --> 392 405 <object name="submenuSinglePlayer" 393 406 type="image" 394 size=" 44 100%-4 100%-4"407 size="0 4 100%-4 100%-4" 395 408 tooltip_style="pgToolTip" 396 409 tooltip="The 0 A.D. Game Manual." … … 434 447 <object name="submenuMultiplayer" 435 448 type="image" 436 size=" 44 100%-4 100%-4"449 size="0 4 100%-4 100%-4" 437 450 tooltip_style="pgToolTip" 438 451 tooltip="The 0 A.D. Game Manual" … … 476 489 <object name="submenuToolsAndOptions" 477 490 type="image" 478 size=" 44 100%-4 100%-4"491 size="0 4 100%-4 100%-4" 479 492 tooltip_style="pgToolTip" 480 493 tooltip="The 0 A.D. Game Manual"
Note:
See TracChangeset
for help on using the changeset viewer.
