Ticket #3041: clean_mainmenu_WIP.diff
File clean_mainmenu_WIP.diff, 7.6 KB (added by , 9 years ago) |
---|
-
binaries/data/mods/mod/gui/common/modern/sprites.xml
626 626 texture_size="0 0 24 24" 627 627 /> 628 628 </sprite> 629 <!-- 630 ========================================== 631 LOGOS 632 ========================================== 633 --> 634 <sprite name="productLogo"> 635 <image texture="global/modern/logo/0ad_logo.png" 636 real_texture_placement="0 0 256 128" 637 size="0 -5% 100% 105%" 638 /> 639 </sprite> 640 <sprite name="companyLogo"> 641 <image texture="global/modern/logo/wfg_logo_white.png" 642 real_texture_placement="0 0 32 32" 643 /> 644 </sprite> 629 645 </sprites> -
binaries/data/mods/mod/gui/common/modern/styles.xml
155 155 text_valign="center" 156 156 sound_pressed="audio/interface/ui/ui_button_click.ogg" 157 157 /> 158 <style name="ModernButtonRedFancy" 159 sprite="ModernButtonRed" 160 sprite_disabled="ModernButtonRedDisabled" 161 sprite_over="ModernButtonYellowOver" 162 sprite_pressed="ModernButtonYellow" 163 font="sans-bold-stroke-14" 164 textcolor="white" 165 text_align="center" 166 text_valign="center" 167 sound_pressed="audio/interface/ui/ui_button_click.ogg" 168 /> 158 169 </styles> -
binaries/data/mods/public/gui/common/common_sprites.xml
1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 3 3 <sprites> 4 5 4 <!-- 6 5 ========================================== 7 LOGOS8 ==========================================9 -->10 11 <sprite name="productLogo">12 <image texture="pregame/shell/logo/0ad_logo.png"13 real_texture_placement="0 0 256 128"14 size="0 -5% 100% 105%"15 />16 </sprite>17 18 <sprite name="companyLogo">19 <image texture="pregame/shell/logo/wfg_logo_white.png"20 real_texture_placement="0 0 32 32"21 />22 </sprite>23 24 <!--25 ==========================================26 6 BACKCOLOR SPRITES 27 7 ========================================== 28 8 --> … … 119 99 ========================================== 120 100 --> 121 101 122 <!-- MainMenuPanel -->123 <sprite name="MainMenuPanel">124 <image texture="global/tile/stone_background.png"125 real_texture_placement="28 0 292 264"126 texture_size="0 0 240 240"127 />128 102 129 <image texture="pregame/shading/menu_panel_background_shading.png"130 texture_size="0 0 100% 100%"131 size="0 0 100% 100%"132 />133 134 <!-- sides -->135 <!-- <image backcolor="230 190 80"136 size="2 0 100%-2 2"137 />138 <image backcolor="230 190 80"139 size="100%-2 0 100% 100%"140 />141 <image backcolor="230 190 80"142 size="2 100%-2 100%-2 100%"143 />144 <image backcolor="230 190 80"145 size="0 0 2 100%"146 />-->147 148 <!-- top -->149 <image backcolor="230 190 80"150 size="2 0 100%-2 2"151 />152 153 <!-- bottom -->154 <image backcolor="230 190 80"155 size="2 100%-2 100%-2 100%"156 />157 158 <!-- left -->159 <image backcolor="230 190 80"160 size="0 0 2 100%"161 />162 </sprite>163 164 <!-- MainMenuPanelRightBorder -->165 <sprite name="MainMenuPanelRightBorder">166 <!-- right -->167 <image backcolor="230 190 80"168 size="0 0 100% 100%"169 />170 </sprite>171 172 <!-- SubmenuPanel -->173 <sprite name="SubmenuPanel">174 <image texture="global/tile/stone_background.png"175 real_texture_placement="32 0 292 264"176 texture_size="0 0 240 240"177 />178 179 <image texture="pregame/shading/menu_panel_background_shading.png"180 texture_size="0 0 100% 100%"181 size="0 0 100% 100%"182 />183 184 <!-- sides -->185 <image backcolor="230 190 80"186 size="0 0 100%-2 2"187 />188 <image backcolor="230 190 80"189 size="100%-2 0 100% 100%"190 />191 <image backcolor="230 190 80"192 size="0 100%-2 100%-2 100%"193 />194 <!-- no left border here -->195 </sprite>196 197 103 <!-- TranslucentPanel --> 198 104 <sprite name="TranslucentPanelThinBorder"> 199 105 <image backcolor="0 0 0 85" -
binaries/data/mods/public/gui/common/common_styles.xml
142 142 text_valign="top" 143 143 /> 144 144 145 <style name="MainMenuPanel"146 sprite="MainMenuPanel"147 buffer_zone="10"148 text_align="left"149 text_valign="top"150 />151 152 <style name="SubmenuPanel"153 sprite="SubmenuPanel"154 buffer_zone="10"155 text_align="left"156 text_valign="top"157 />158 159 145 <style name="LargeStonePanelThinBorder" 160 146 sprite="LargeStonePanelThinBorder" 161 147 buffer_zone="10" -
binaries/data/mods/public/gui/page_pregame.xml
4 4 <include>common/modern/styles.xml</include> 5 5 <include>common/modern/sprites.xml</include> 6 6 7 <include>common/setup.xml</include> 8 <include>common/sprite1.xml</include> 9 <include>common/styles.xml</include> 10 <include>common/common_sprites.xml</include> 11 <include>common/common_styles.xml</include> 12 <include>common/init.xml</include> 13 7 <include>pregame/setup.xml</include> 14 8 <include>pregame/sprites.xml</include> 15 9 <include>pregame/styles.xml</include> 16 10 <include>pregame/mainmenu.xml</include> -
binaries/data/mods/public/gui/pregame/mainmenu.js
1 1 var userReportEnabledText; // contains the original version with "$status" placeholder 2 var currentSubmenuType ; // contains submenu type2 var currentSubmenuType, currentSubmenuCaller; // contains submenu type, submenu caller 3 3 const MARGIN = 4; // menu border size 4 4 const background = "hellenes1"; // Background type. 5 5 … … 200 200 } 201 201 202 202 // Opens the menu by revealing the screen which contains the menu 203 function openMenu( newSubmenu, position, buttonHeight, numButtons)203 function openMenu(context, newSubmenu, position, buttonHeight, numButtons) 204 204 { 205 // Make button which opened submenu look like it stays selected 206 currentSubmenuCaller = context.name; 207 Engine.GetGUIObjectByName(currentSubmenuCaller).sprite = "ModernButtonYellow"; 208 205 209 // switch to new submenu type 206 210 currentSubmenuType = newSubmenu; 207 211 Engine.GetGUIObjectByName(currentSubmenuType).hidden = false; … … 222 226 // Closes the menu and resets position 223 227 function closeMenu() 224 228 { 225 // playButtonSound(); 229 // 'un-select' button 230 if (currentSubmenuCaller) 231 Engine.GetGUIObjectByName(currentSubmenuCaller).sprite = "ModernButtonRed"; 226 232 227 233 // remove old submenu type 228 234 Engine.GetGUIObjectByName(currentSubmenuType).hidden = true; … … 279 285 closeMenu(); 280 286 var btCaptions = [translate("No"), translate("Yes")]; 281 287 var btCode = [null, Engine.Exit]; 282 messageBox(400, 200, translate("Are you sure you want to quit 0 A.D.?"), translate("Confirmation"), 0, btCaptions, btCode);288 messageBox(400, 200, translate("Are you sure you want to exit 0 A.D. Empires Ascendant?"), translate("Confirmation"), 0, btCaptions, btCode); 283 289 } 284 290 285 291 function pressedScenarioEditorButton()