This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 10119 for ps


Ignore:
Timestamp:
08/28/11 03:28:50 (13 years ago)
Author:
brian
Message:

hide yellow border between main menu and submenu

Location:
ps/trunk/binaries/data/mods/public/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/binaries/data/mods/public/gui/common/common_sprites.xml

    r10111 r10119  
    106106
    107107        <!-- sides -->
    108         <image  backcolor="230 190 80"
     108<!--        <image  backcolor="230 190 80"
    109109            size="2 0 100%-2 2"
    110110        />
     
    117117        <image  backcolor="230 190 80"
    118118            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 -->
    120168    </sprite>
    121169
  • ps/trunk/binaries/data/mods/public/gui/common/common_styles.xml

    r10108 r10119  
    136136    <style  name="MainMenuPanel"
    137137        sprite="MainMenuPanel"
     138        buffer_zone="10"
     139        text_align="left"
     140        text_valign="top"
     141    />
     142       
     143        <style  name="SubmenuPanel"
     144        sprite="SubmenuPanel"
    138145        buffer_zone="10"
    139146        text_align="left"
  • ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.js

    r10108 r10119  
    101101}
    102102
     103
     104
     105
     106const MARGIN = 4;
     107
     108// Sizes right border on main menu panel to match the submenu
     109function 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
    103119// Update the submenu
    104120function updateSubmenu(newSubmenu, position, buttonHeight, numButtons)
    105121{
    106         const MARGIN = 4;
    107    
    108122        // remove old submenu
    109123        getGUIObjectByName(currentSubmenu).hidden = true;
     
    120134        submenu.hidden = false;
    121135       
     136        // Blend in right border of main menu into the left border of the submenu
     137        blendSubmenuIntoMain(top, bottom);
     138       
    122139        // prepare to hide the submenu when the mouse moves off of the submenu
    123140        getGUIObjectByName("submenuScreen").hidden = false;
  • ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.xml

    r10114 r10119  
    153153        ==========================================
    154154        -->
    155         <object
    156             type="image"
     155        <object type="image"
    157156            style="MainMenuPanel"
    158157            size="60 -2 300 100%+2"
    159                        
    160158                >
     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                   
    161173                        <object name="productLogo"
    162174                                type="image"
     
    380392                        <!-- hides the submenu when the mouse leaves the mainMenuButtons or submenu -->
    381393                        <action on="MouseEnter">
    382                             <![CDATA[getGUIObjectByName("submenu").hidden = true;]]>
     394                                getGUIObjectByName("submenu").hidden = true;
     395                                getGUIObjectByName("MainMenuPanelRightBorderTop").size = "100%-2 0 100% 100%";
    383396            </action>
    384397                       
     
    386399                        <object name="submenu"
    387400                                type="image"
    388                                 style="MainMenuPanel"
    389                                 size="298 50%-100 538 50%+100"
     401                                style="SubmenuPanel"
     402                                size="300 50%-100 536 50%+100"
    390403                        >
    391404                                <!-- submenuSinglePlayer -->
    392405                                <object name="submenuSinglePlayer"
    393406                                        type="image"
    394                                         size="4 4 100%-4 100%-4"
     407                                        size="0 4 100%-4 100%-4"
    395408                                        tooltip_style="pgToolTip"
    396409                                        tooltip="The 0 A.D. Game Manual."
     
    434447                                <object name="submenuMultiplayer"
    435448                                              type="image"
    436                                               size="4 4 100%-4 100%-4"
     449                                              size="0 4 100%-4 100%-4"
    437450                                              tooltip_style="pgToolTip"
    438451                                              tooltip="The 0 A.D. Game Manual"
     
    476489                                <object name="submenuToolsAndOptions"
    477490                                        type="image"
    478                                         size="4 4 100%-4 100%-4"
     491                                        size="0 4 100%-4 100%-4"
    479492                                        tooltip_style="pgToolTip"
    480493                                        tooltip="The 0 A.D. Game Manual"
Note: See TracChangeset for help on using the changeset viewer.