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 10103 for ps


Ignore:
Timestamp:
08/27/11 08:20:16 (13 years ago)
Author:
brian
Message:

moved some buttons to second tier, updated style of history section

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

Legend:

Unmodified
Added
Removed
  • ps/trunk/binaries/data/mods/public/gui/civinfo/civinfo.js

    r8827 r10103  
    11
    22var g_CivData = {};
     3var TEXTCOLOR = "white"
    34
    45function init(settings)
     
    7374    for(var i = 0; i < civInfo.CivBonuses.length; ++i)
    7475    {
    75         bonusCaption += '[color="10 10 10"][font="serif-bold-14"]' + civInfo.CivBonuses[i].Name + '[/font] [icon="iconInfo" tooltip="'+civInfo.CivBonuses[i].History+'" tooltip_style="civInfoTooltip"]\n     ' + civInfo.CivBonuses[i].Description + '\n[/color]';
     76        bonusCaption += '[color="' + TEXTCOLOR + '"][font="serif-bold-14"]' + civInfo.CivBonuses[i].Name + '[/font] [icon="iconInfo" tooltip="'
     77                    + civInfo.CivBonuses[i].History + '" tooltip_style="civInfoTooltip"]\n     ' + civInfo.CivBonuses[i].Description + '\n[/color]';
    7678    }
    7779
     
    8082    for(var i = 0; i < civInfo.TeamBonuses.length; ++i)
    8183    {
    82         bonusCaption += '[color="10 10 10"][font="serif-bold-14"]' + civInfo.TeamBonuses[i].Name + '[/font] [icon="iconInfo" tooltip="'+civInfo.TeamBonuses[i].History+'" tooltip_style="civInfoTooltip"]\n     ' + civInfo.TeamBonuses[i].Description + '\n[/color]';
     84        bonusCaption += '[color="' + TEXTCOLOR + '"][font="serif-bold-14"]' + civInfo.TeamBonuses[i].Name + '[/font] [icon="iconInfo" tooltip="'
     85                    + civInfo.TeamBonuses[i].History + '" tooltip_style="civInfoTooltip"]\n     ' + civInfo.TeamBonuses[i].Description + '\n[/color]';
    8386    }
    8487   
     
    9497        for(var j = 0; j < faction.Technologies.length; ++j)
    9598        {
    96             techCaption += '[color="10 10 10"][font="serif-bold-14"]' + faction.Technologies[j].Name + '[/font] [icon="iconInfo" tooltip="'+faction.Technologies[j].History+'" tooltip_style="civInfoTooltip"]\n     ' + faction.Technologies[j].Description + '\n[/color]';
     99            techCaption += '[color="' + TEXTCOLOR + '"][font="serif-bold-14"]' + faction.Technologies[j].Name + '[/font] [icon="iconInfo" tooltip="'
     100                            + faction.Technologies[j].History + '" tooltip_style="civInfoTooltip"]\n     ' + faction.Technologies[j].Description + '\n[/color]';
    97101        }
    98102    }
     
    102106    for(var i = 0; i < civInfo.Structures.length; ++i)
    103107    {
    104         techCaption += '[color="10 10 10"][font="serif-bold-14"]' + civInfo.Structures[i].Name + '[/font][/color] [icon="iconInfo" tooltip="'+ civInfo.Structures[i].History+'" tooltip_style="civInfoTooltip"]\n';
     108        techCaption += '[color="' + TEXTCOLOR + '"][font="serif-bold-14"]' + civInfo.Structures[i].Name + '[/font][/color] [icon="iconInfo" tooltip="'
     109                    + civInfo.Structures[i].History + '" tooltip_style="civInfoTooltip"]\n';
    105110    }
    106111   
     
    116121        for(var j = 0; j < faction.Heroes.length; ++j)
    117122        {
    118             heroCaption += '[color="10 10 10"][font="serif-bold-14"]' + faction.Heroes[j].Name + '[/font][/color] [icon="iconInfo" tooltip="'+faction.Heroes[j].History+'" tooltip_style="civInfoTooltip"]\n';
     123            heroCaption += '[color="' + TEXTCOLOR + '"][font="serif-bold-14"]' + faction.Heroes[j].Name + '[/font][/color] [icon="iconInfo" tooltip="'
     124                            + faction.Heroes[j].History + '" tooltip_style="civInfoTooltip"]\n';
    119125        }
    120126        heroCaption += '\n';
  • ps/trunk/binaries/data/mods/public/gui/civinfo/civinfo.xml

    r8497 r10103  
    1111    <object type="image" z="0" sprite="bkTranslucent"/>
    1212
    13     <object type="image" style="wheatWindow" size="50%-450 50%-300 50%+450 50%+300">
     13    <object type="image" style="StonePanelLight" size="50%-466 50%-316 50%+466 50%+316">
    1414
    15         <object style="wheatWindowTitleBar" type="text">Civilizations</object>
     15        <object style="StoneDialogTitleBar" type="text" size="50%-128 -16 50%+128 16">Civilizations</object>
    1616
    1717        <object type="button" style="wheatExit" tooltip_style="snToolTip">
     
    2222       
    2323        <!-- Civ selection -->
    24        
    2524        <object size="25 10 100% 30">
    2625            <object
     
    2827                type="text"
    2928                font="serif-bold-20"
     29                                textcolor="white"
    3030                text_align="left"
    31                 size="0 0 300 100%">
     31                size="50%-320 10 50%-96 48">
    3232                Civilization Selection
    3333            </object>
    3434           
    35             <object name="civSelection" type="dropdown" style="wheatDropDown" size="50%-100 0 50%+100 30">
     35            <object name="civSelection" type="dropdown" style="StoneDropDown" size="50%-96 10 50%+96 40">
    3636                <action on="SelectionChange">selectCiv(this.list_data[this.selected]);</action>
    3737            </object>
     
    3939       
    4040        <!-- Civ data display -->
    41 
    4241        <object size="25 50 100%-25 65%-5">
    4342            <object type="image" sprite="bgInfoHeading" size="0 0 100% 40">
     
    4645                    type="text"
    4746                    font="serif-bold-16"
    48                     textcolor="255 255 255"
     47                    textcolor="white"
    4948                    text_align="left"
    5049                    text_valign="center"
     
    5352            </object>
    5453           
    55             <object type="image" sprite="bgInfoBox" size="0 40 33%-5 100%">
     54            <object type="image" sprite="TranslucentPanel" size="0 40 33%-5 100%">
    5655                <object
    5756                    name="civBonuses"
    5857                    type="text"
    5958                    font="serif-14"
     59                                        textcolor="white"
    6060                    text_align="left"
    6161                    size="10 0 100%-10 100%-10"
     
    6868                    type="text"
    6969                    font="serif-14"
     70                                        textcolor="white"
    7071                    text_align="left"
    7172                    size="10 0 100%-10 100%-10"
     
    7879                    type="text"
    7980                    font="serif-14"
     81                                        textcolor="white"
    8082                    text_align="left"
    8183                    size="10 0 100%-10 100%-10"
     
    8789       
    8890        <!-- Civ history display -->
    89        
    9091        <object size="25 65% 100%-25 100%-50">
    9192            <object type="image" sprite="bgInfoHeading" size="0 0 100% 35">
     
    9495                    type="text"
    9596                    font="serif-bold-16"
    96                     textcolor="255 255 255"
     97                    textcolor="white"
    9798                    text_align="left"
    9899                    text_valign="center"
     
    106107                    type="text"
    107108                    font="serif-14"
     109                                        textcolor="white"
    108110                    text_align="left"
    109111                    size="10 0 100% 100%"
     
    115117        <object
    116118            type="button"
    117             style="wheatButton"
    118             font="serif-16"
    119             size="100%-140 100%-40 100%+3 100%+3"
    120         >Done
     119            style="StoneButton"
     120            size="100%-150 100%-48 100%-24 100%-16"
     121        >Close
    121122            <action on="Press"><![CDATA[
    122123                Engine.PopGuiPage();
  • ps/trunk/binaries/data/mods/public/gui/civinfo/setup.xml

    r8497 r10103  
    77        delay="50"
    88        font="serif-12"
     9                textcolor="white"
    910        maxwidth="200"
    1011        offset="16 24"
    1112        sprite="bgTooltipBox"
    12         textcolor="255 255 255"
    1313    />
    1414</setup>
  • ps/trunk/binaries/data/mods/public/gui/civinfo/sprites.xml

    r8497 r10103  
    99    </sprite>
    1010   
    11     <sprite name="bgInfoBox">
    12                 <image  backcolor="120 70 0 100"
     11        <sprite name="bgInfoBox">
     12                <image  backcolor="50 35 0 100"
    1313            size="0 0 100% 100%"
    1414        />
  • ps/trunk/binaries/data/mods/public/gui/common/common_sprites.xml

    r10086 r10103  
    120120    </sprite>
    121121
    122     <!-- Stone Tooltip -->
    123     <sprite name="stoneTooltip">
     122    <!-- TranslucentPanel -->
     123    <sprite name="TranslucentPanel">
    124124        <image  backcolor="0 0 0 85"
    125125            size="0 0 100% 100%"
  • ps/trunk/binaries/data/mods/public/gui/common/common_styles.xml

    r10085 r10103  
    105105    -->
    106106
    107     <style  name="stoneTooltip"
    108         sprite="stoneTooltip"
     107    <style  name="TranslucentPanel"
     108        sprite="TranslucentPanel"
    109109        buffer_zone="10"
    110110        font="serif-bold-stroke-14"
  • ps/trunk/binaries/data/mods/public/gui/page_civinfo.xml

    r8497 r10103  
    44    <include>common/sprite1.xml</include>
    55    <include>common/styles.xml</include>
     6   
     7<include>common/common_sprites.xml</include>
     8<include>common/common_styles.xml</include>
     9
    610    <include>civinfo/civinfo.xml</include>
    711    <include>civinfo/setup.xml</include>
  • ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.js

    r10097 r10103  
    100100
    101101// Update the submenu
    102 var margin = 4;
     102var MARGIN = 4;
    103103var currentSubmenu;
    104 function updateSubmenu(buttonName, newSubmenu)
     104function updateSubmenu(buttonName, newSubmenu, numButtons)
    105105{
    106106        // hide old submenu if possible
     
    117117       
    118118        // find  position of new submenu
    119         var mainMenubutton = getGUIObjectByName(buttonName);
     119        var sourceButton = getGUIObjectByName(buttonName);
    120120        var verticalOffset = getGUIObjectByName("mainMenuButtons").size.top;
    121         var top = verticalOffset + mainMenubutton.size.top - margin;
    122         var bottom = verticalOffset + mainMenubutton.size.bottom + margin;
     121        var buttonHeight = sourceButton.size.bottom - sourceButton.size.top;
     122       
     123        var top = verticalOffset + sourceButton.size.top - MARGIN;
     124        var bottom = verticalOffset + sourceButton.size.bottom + buttonHeight * (numButtons-1) + MARGIN;
    123125       
    124126        // set position of new submenu
  • ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.xml

    r10098 r10103  
    4141
    4242        <object name="pgToolTip"
    43             style="stoneTooltip"
     43            style="TranslucentPanel"
    4444            type="text"
    4545            hidden="true"
     
    5858                        size="100%-16 0 100% 16"
    5959                        tooltip=""
     60                        z="20"
    6061                >
    6162                        <action on="Press"><![CDATA[
     
    181182                                />
    182183                           
     184                                <!-- LEARN TO PLAY BUTTON -->
    183185                <object name="menuLearnToPlayButton"
    184186                                      type="button"
     
    194196                               </object>
    195197                           
     198                               <!-- SINGLEPLAYER BUTTON -->
    196199                               <object name="menuSinglePlayerButton"
    197200                                       style="StoneButtonFancy"
     
    203206                                    Single Player
    204207                                    <action on="Press"><![CDATA[
    205                                             updateSubmenu("menuSinglePlayerButton", "submenuSinglePlayer");
     208                                            updateSubmenu("menuSinglePlayerButton", "submenuSinglePlayer", 3);
    206209                                    ]]></action>
    207210                                </object>
    208211                               
     212                                <!-- MULTIPLAYER BUTTON -->
    209213                                <object name="menuMultiplayerButton"
    210214                                        style="StoneButtonFancy"
     
    216220                                        Multiplayer
    217221                                        <action on="Press"><![CDATA[
    218                                                 updateSubmenu("menuMultiplayerButton", "submenuMultiplayer");
     222                                                updateSubmenu("menuMultiplayerButton", "submenuMultiplayer", 2);
    219223                                        ]]></action>
    220224                                </object>
    221 
    222                                 <object name="menuEditorButton"
     225                               
     226                                <!-- TOOLS AND OPTIONS BUTTON -->
     227                                <object name="menuToolsAndOptionsButton"
    223228                                        style="StoneButtonFancy"
    224229                                        type="button"
    225230                                        size="4 100 100%-4 132"
    226231                                        tooltip_style="pgToolTip"
    227                                         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 &quot;-editor&quot;."
     232                                        tooltip="This will take you to the options menu.  It does not work now, but someday it will."
    228233                                >
    229                                         Scenario Editor
     234                                        Tools <![CDATA[&]]> Options
    230235                                        <action on="Press"><![CDATA[
    231                                                 if (Engine.AtlasIsAvailable())
    232                                                         Engine.RestartInAtlas();
    233                                                 else
    234                                                         messageBox(400, 200, "The scenario editor is not available or failed to load.", "Error", 2);
     236                                                updateSubmenu("menuToolsAndOptionsButton", "submenuToolsAndOptions", 2);
    235237                                        ]]></action>
    236238                                </object>
    237239                               
    238                                 <object name="menuOptionsButton"
     240                                <!-- HISTORY BUTTON -->
     241                                <object name="menuHistoryButton"
    239242                                        style="StoneButtonFancy"
    240243                                        type="button"
    241244                                        size="4 132 100%-4 164"
    242245                                        tooltip_style="pgToolTip"
    243                                         tooltip="This will take you to the options menu.  It does not work now, but someday it will."
    244                                         enabled="false"
     246                                        tooltip="Learn about the six civilizations featured in 0 A.D."
    245247                                >
    246                                         Options
     248                                        History
    247249                                        <action on="Press"><![CDATA[
    248                                                 // Open Options window.
    249                                                 openMainMenuSubWindow ("pgOptions");
    250                                         ]]></action>
     250                        Engine.PushGuiPage("page_civinfo.xml");
     251                    ]]></action>
    251252                                </object>
    252253                               
     
    266267                                        ]]></action>
    267268                                </object>
    268 
    269 <!--                        <object name="menuCampaignsButton"
    270                                        style="StoneButtonFancy"
    271                                        type="button"
    272                                        size="4 36 100%-4 68"
    273                                        tooltip_style="pgToolTip"
    274                                        tooltip="Want to play a campaign? Unfortunately you'll have to wait as they're not yet implemented."
    275                                        enabled="false"
    276                                >
    277                                     Historical Campaigns
    278                             <action on="Press"><![CDATA[
    279                                     openMainMenuSubWindow ("pgCampaigns");
    280                             ]]></action>
    281                         </object>
    282 -->
    283 <!--                        <object name="menuHistoryButton"
    284                                 style="StoneButtonFancy"
    285                                 type="button"
    286                                 size="4 36 100%-4 68"
    287                                 tooltip_style="pgToolTip"
    288                                 tooltip="One day you will click this button and learn more about ancient history than any history teacher ever taught you."
    289                                 enabled="false"
    290                         >
    291                                 History
    292                                 <action on="Press"><![CDATA[
    293                                         openMainMenuSubWindow ("pgHistory");
    294                                 ]]></action>
    295                         </object>
    296 -->
    297269                        </object>
    298270
     
    300272            <object size="8 100%-340 100%-8 100%-100"
    301273                type="image"
    302                 style="stoneTooltip"
     274                style="TranslucentPanel"
    303275            >
    304276
     
    397369                        name="submenuScreen"
    398370            type="image"
     371                        hidden="true"
    399372                >
    400373                        <action on="MouseEnter">
     
    421394                                              tooltip="Click here to start a new single player game. (A very basic computer opponent is available for testing purposes.)"
    422395                                >
    423                                         Single Player
     396                                        Single Player Matches
    424397                                        <action on="Press"><![CDATA[
    425398                                                // Open Session Setup window.
    426399                                                Engine.PushGuiPage("page_gamesetup.xml", { type: "offline" });
     400                                        ]]></action>
     401                                </object>
     402                               
     403                                <object name="subMenuCampaignButton"
     404                                              type="button"
     405                                              style="StoneButtonFancy"
     406                                              size="0 32 100% 64"
     407                                              tooltip_style="pgToolTip"
     408                                              tooltip="Want to play a campaign? Unfortunately you'll have to wait as they're not yet implemented."
     409                                              enabled="false"
     410                                >
     411                                        Historical Campaigns
     412                                        <action on="Press"><![CDATA[
     413                                            openMainMenuSubWindow ("pgCampaigns");
    427414                                        ]]></action>
    428415                                </object>
     
    451438                                </object>
    452439                        </object>
     440                       
     441                        <object name="submenuToolsAndOptions"
     442                                      type="image"
     443                                      size="4 4 100%-4 100%-4"
     444                                      tooltip_style="pgToolTip"
     445                                      tooltip="The 0 A.D. Game Manual"
     446                                      hidden="true"
     447            >
     448                                <object name="submenuOptionsButton"
     449                                        style="StoneButtonFancy"
     450                                        type="button"
     451                                        size="4 0 100%-4 32"
     452                                        tooltip_style="pgToolTip"
     453                                        tooltip="This will take you to the options menu.  It does not work now, but someday it will."
     454                                        enabled="false"
     455                                >
     456                                        Options
     457                                        <action on="Press"><![CDATA[
     458                                                // Open Options window.
     459                                                openMainMenuSubWindow ("pgOptions");
     460                                        ]]></action>
     461                                </object>
     462                       
     463                                <object name="submenuEditorButton"
     464                                        style="StoneButtonFancy"
     465                                        type="button"
     466                                        size="4 32 100%-4 64"
     467                                        tooltip_style="pgToolTip"
     468                                        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 &quot;-editor&quot;."
     469                                >
     470                                        Scenario Editor
     471                                        <action on="Press"><![CDATA[
     472                                                if (Engine.AtlasIsAvailable())
     473                                                        Engine.RestartInAtlas();
     474                                                else
     475                                                        messageBox(400, 200, "The scenario editor is not available or failed to load.", "Error", 2);
     476                                        ]]></action>
     477                                </object>
     478                        </object>
    453479                </object>
    454480               
  • ps/trunk/binaries/data/mods/public/gui/session/session.xml

    r10085 r10103  
    194194
    195195        <!-- Chat window -->
    196         <object name="chatDialogPanel" size="50%-200 50%-46 50%+200 50%+46" type="image" hidden="true" style="StonePanelThinBorder">
     196        <object name="chatDialogPanel" size="50%-200 50%-46 50%+200 50%+46" type="image" hidden="true" sprite="genericPanel">
    197197            <object name="chatInput" size="16 12 100%-16 36" type="input" style="chatInput" max_length="80">
    198198                <action on="Press">submitChatInput();</action>
     
    299299        <!-- ================================  ================================ -->
    300300        <object name="settingsDialogPanel"
    301             style="StonePanelThinBorder"
     301            style="TranslucentPanel"
    302302            type="image"
    303303            size="80%-180 50%-200 50%+180 50%+50"
     
    499499            <!-- Stance Selection -->
    500500            <object name="unitStancePanel"
    501                 style="StonePanelThinBorder"
     501                style="TranslucentPanel"
    502502                size="0 100%-43 100% 100%"
    503503                type="text"
     
    669669
    670670            <object name="unitResearchPanel"
    671                 style="StonePanelThinBorder"
     671                style="TranslucentPanel"
    672672                size="0 100%-56 100% 100%"
    673673                type="text"
     
    697697                size="4 -56 100% 0"
    698698                type="image"
    699                 style="StonePanelThinBorder"
     699                style="TranslucentPanel"
    700700            >
    701701                <object size="-4 -2 52 54" type="image" sprite="snIconSheetTab" tooltip_style="sessionToolTipBottom" cell_id="3" tooltip="Production queue">
  • ps/trunk/binaries/data/mods/public/gui/summary/sprites.xml

    r10085 r10103  
    77   
    88    <sprite name="bgInfoBox">
    9         <image  backcolor="255 255 255 50" size="0 0 100% 100%" />
     9        <image  backcolor="50 35 0 100" size="0 0 100% 100%" />
    1010    </sprite>
    1111</sprites>
Note: See TracChangeset for help on using the changeset viewer.