Ticket #3041: clean_mainmenu_WIP.diff

File clean_mainmenu_WIP.diff, 7.6 KB (added by Josh, 9 years ago)

Backup of current work

  • binaries/data/mods/mod/gui/common/modern/sprites.xml

     
    626626            texture_size="0 0 24 24"
    627627        />
    628628    </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>
    629645</sprites>
  • binaries/data/mods/mod/gui/common/modern/styles.xml

     
    155155        text_valign="center"
    156156        sound_pressed="audio/interface/ui/ui_button_click.ogg"
    157157    />
     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    />
    158169</styles>
  • binaries/data/mods/public/gui/common/common_sprites.xml

     
    11<?xml version="1.0" encoding="utf-8"?>
    22
    33<sprites>
    4 
    54    <!--
    65    ==========================================
    7     LOGOS
    8     ==========================================
    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     ==========================================
    266    BACKCOLOR SPRITES
    277    ==========================================
    288    -->
     
    11999    ==========================================
    120100    -->
    121101
    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         />
    128102
    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 
    197103    <!-- TranslucentPanel -->
    198104    <sprite name="TranslucentPanelThinBorder">
    199105        <image  backcolor="0 0 0 85"
  • binaries/data/mods/public/gui/common/common_styles.xml

     
    142142        text_valign="top"
    143143    />
    144144
    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 
    159145    <style  name="LargeStonePanelThinBorder"
    160146        sprite="LargeStonePanelThinBorder"
    161147        buffer_zone="10"
  • binaries/data/mods/public/gui/page_pregame.xml

     
    44    <include>common/modern/styles.xml</include>
    55    <include>common/modern/sprites.xml</include>
    66
    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>
    148    <include>pregame/sprites.xml</include>
    159    <include>pregame/styles.xml</include>
    1610    <include>pregame/mainmenu.xml</include>
  • binaries/data/mods/public/gui/pregame/mainmenu.js

     
    11var userReportEnabledText; // contains the original version with "$status" placeholder
    2 var currentSubmenuType; // contains submenu type
     2var currentSubmenuType, currentSubmenuCaller; // contains submenu type, submenu caller
    33const MARGIN = 4; // menu border size
    44const background = "hellenes1"; // Background type.
    55
     
    200200}
    201201
    202202// Opens the menu by revealing the screen which contains the menu
    203 function openMenu(newSubmenu, position, buttonHeight, numButtons)
     203function openMenu(context, newSubmenu, position, buttonHeight, numButtons)
    204204{
     205    // Make button which opened submenu look like it stays selected
     206    currentSubmenuCaller = context.name;
     207    Engine.GetGUIObjectByName(currentSubmenuCaller).sprite = "ModernButtonYellow";
     208
    205209    // switch to new submenu type
    206210    currentSubmenuType = newSubmenu;
    207211    Engine.GetGUIObjectByName(currentSubmenuType).hidden = false;
     
    222226// Closes the menu and resets position
    223227function closeMenu()
    224228{
    225 //  playButtonSound();
     229    // 'un-select' button
     230    if (currentSubmenuCaller)
     231        Engine.GetGUIObjectByName(currentSubmenuCaller).sprite = "ModernButtonRed";
    226232
    227233    // remove old submenu type
    228234    Engine.GetGUIObjectByName(currentSubmenuType).hidden = true;
     
    279285    closeMenu();
    280286    var btCaptions = [translate("No"), translate("Yes")];
    281287    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);
    283289}
    284290
    285291function pressedScenarioEditorButton()