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


Ignore:
Timestamp:
08/28/11 23:32:35 (13 years ago)
Author:
brian
Message:

Commented out most of old styles.xml and changed references to new styles, outlined tabs in summary, fixed chat color in multiplayer setup

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

Legend:

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

    r10119 r10130  
    22
    33<styles>
    4 
    5 
    6 
    7 
    84
    95
     
    9995    />
    10096
     97    <style name="ChatText"
     98        font="serif-9"
     99        textcolor="white"
     100        text_align="left"
     101        text_valign="top"
     102    />
     103
     104
    101105
    102106
     
    115119    ==========================================
    116120    -->
    117        
     121
    118122        <style  name="TranslucentPanel"
    119123        sprite="BackgroundTranslucent"
     
    124128        text_valign="top"
    125129    />
    126        
     130
    127131        <style  name="TranslucentPanelThinBorder"
    128132        sprite="TranslucentPanelThinBorder"
     
    140144        text_valign="top"
    141145    />
    142        
     146
    143147        <style  name="SubmenuPanel"
    144148        sprite="SubmenuPanel"
  • ps/trunk/binaries/data/mods/public/gui/common/styles.xml

    r7766 r10130  
    2828    -->
    2929
    30     <style  name="thinWheatWindow"
     30<!--    <style  name="thinWheatWindow"
    3131        sprite="thinWheatWindowSand"
    3232        buffer_zone="10"
     
    3434        text_valign="top"
    3535    />
    36    
     36
    3737    <style  name="wheatWindow"
    3838        sprite="wheatWindowSand"
     
    5555        text_align="center"
    5656        text_valign="center"
    57     />
     57    />-->
    5858
    5959    <!--
     
    6363    -->
    6464
    65     <style  name="skin*Hele*Window"
     65<!--    <style  name="skin*Hele*Window"
    6666        sprite="bkGraniteBorderBlack"
    6767        buffer_zone="10"
     
    8484        text_align="center"
    8585        text_valign="center"
    86     />
     86    />-->
    8787
    8888    <!--
     
    9292    -->
    9393
    94     <style  name="wheatButton"
     94<!--    <style  name="wheatButton"
    9595        sprite="wheatButton"
    9696        sprite_disabled="wheatButtonDisabled"
     
    187187        text_align="left"
    188188        text_valign="center"
    189     />
    190    
     189    />-->
     190
    191191    <!--
    192192    This control is new, so here's a summary:
     
    208208    -->
    209209
    210     <style  name="wheatDropDown"
     210<!--    <style  name="wheatDropDown"
    211211        dropdown_buffer="1"
    212212        font="serif-13"
     
    230230        scrollbar="true"
    231231        scrollbar_style="wheatScrollBar"
    232     />
     232    />-->
    233233
    234234    <!--
     
    244244        -->
    245245
    246         <style  name="wheatTextHeadMaxBlack"
     246<!--        <style  name="wheatTextHeadMaxBlack"
    247247            ghost="true"
    248248            font="serif-bold-18"
    249249            text_align="center"
    250250            textcolor="black"
    251         />
     251        />-->
    252252
    253253        <!--
     
    258258        -->
    259259
    260         <style  name="wheatTextHeadBlack"
     260<!--        <style  name="wheatTextHeadBlack"
    261261            ghost="true"
    262262            font="serif-16"
    263263            textcolor="black"
    264         />
     264        />-->
    265265
    266266        <!--
     
    271271        -->
    272272
    273         <style  name="wheatTextLabelBlack"
     273<!--        <style  name="wheatTextLabelBlack"
    274274            ghost="true"
    275275            font="serif-14"
    276276            textcolor="black"
    277         />
     277        />-->
    278278
    279279        <!--
     
    284284        -->
    285285
    286         <style  name="fancyTextHeadGold"
     286<!--        <style  name="fancyTextHeadGold"
    287287            ghost="true"
    288288            font="serif-16"
     
    294294            font="serif-14"
    295295            textcolor="white"
    296         />
     296        />-->
    297297
    298298    <!--
     
    302302    -->
    303303
    304     <style  name="wheatBorderBlack"
    305         scrollbar_style="wheatScrollBar"   
     304<!--    <style  name="wheatBorderBlack"
     305        scrollbar_style="wheatScrollBar"
    306306        sprite="bkBorderBlack"
    307307        sprite_selectarea="bkFillGray"
     
    323323        textcolor="black"
    324324        textcolor_selected="white"
    325     />
     325    />-->
    326326
    327327    <!--
     
    331331    -->
    332332
    333     <style name="wheatProgressBarBlue"
     333<!--    <style name="wheatProgressBarBlue"
    334334        sprite_background="bkBorderBlack"
    335335        sprite_bar="bkBlueBorderBlack"
     
    337337        tooltip_style="snToolTip"
    338338        tooltip="(TBA)"
    339     />
     339    />-->
    340340
    341341</styles>
  • ps/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js

    r9783 r10130  
    4343
    4444var g_MapFilters = [];
    45    
     45
    4646// To prevent the display locking up while we load the map metadata,
    4747// we'll start with a 'loading' message and switch to the main screen in the
     
    7777    // Load AI list
    7878    g_AIs = Engine.GetAIs();
    79    
     79
    8080    // Sort AIs by displayed name
    8181    g_AIs.sort(function (a, b) {
    8282        return a.data.name < b.data.name ? -1 : b.data.name < a.data.name ? +1 : 0;
    8383    });
    84    
     84
    8585    // Get default player data - remove gaia
    8686    g_DefaultPlayerData = initPlayerDefaults();
    8787    g_DefaultPlayerData.shift();
    88    
     88
    8989    g_MapSizes = initMapSizes();
    9090
    9191    // Init civs
    9292    initCivNameList();
    93    
     93
    9494    // Init map types
    9595    var mapTypes = getGUIObjectByName("mapTypeSelection");
    9696    mapTypes.list = ["Scenario","Random"];
    9797    mapTypes.list_data = ["scenario","random"];
    98    
     98
    9999    // Setup map filters - will appear in order they are added
    100100    addFilter("Default", function(settings) { return settings && !keywordTestOR(settings.Keywords, ["demo", "hidden"]); });
     
    102102    addFilter("Old Maps", function(settings) { return !settings; });
    103103    addFilter("All Maps", function(settings) { return true; });
    104    
     104
    105105    // Populate map filters dropdown
    106106    var mapFilters = getGUIObjectByName("mapFilterSelection");
    107107    mapFilters.list = getFilters();
    108108    g_GameAttributes.mapFilter = "Default";
    109    
     109
    110110    // Setup controls for host only
    111111    if (g_IsController)
     
    113113        mapTypes.selected = 0;
    114114        mapFilters.selected = 0;
    115        
     115
    116116        initMapNameList();
    117        
     117
    118118        var numPlayersSelect = getGUIObjectByName("numPlayersSelection");
    119119        var players = [];
     
    123123        numPlayersSelect.list_data = players;
    124124        numPlayersSelect.selected = MAX_PLAYERS - 1;
    125        
     125
    126126        var victoryConditions = getGUIObjectByName("victoryCondition");
    127127        victoryConditions.list = VICTORY_TEXT;
     
    133133                g_GameAttributes.settings.GameType = VICTORY_DATA[this.selected];
    134134            }
    135            
     135
    136136            if (!g_IsInGuiUpdate)
    137137            {
     
    140140        };
    141141        victoryConditions.selected = VICTORY_DEFAULTIDX;
    142        
     142
    143143        var mapSize = getGUIObjectByName("mapSize");
    144144        mapSize.list = g_MapSizes.names;
     
    150150                g_GameAttributes.settings.Size = g_MapSizes.tiles[this.selected];
    151151            }
    152            
     152
    153153            if (!g_IsInGuiUpdate)
    154154            {
     
    156156            }
    157157        };
    158        
     158
    159159        getGUIObjectByName("revealMap").onPress = function()
    160160        {   // Update attributes so other players can see change
    161161            g_GameAttributes.settings.RevealMap = this.checked;
    162            
     162
    163163            if (!g_IsInGuiUpdate)
    164164            {
     
    166166            }
    167167        };
    168        
     168
    169169        getGUIObjectByName("lockTeams").onPress = function()
    170170        {   // Update attributes so other players can see change
    171171            g_GameAttributes.settings.LockTeams = this.checked;
    172            
     172
    173173            if (!g_IsInGuiUpdate)
    174174            {
     
    184184        getGUIObjectByName("mapFilterSelection").hidden = true;
    185185        getGUIObjectByName("mapSelection").enabled = false;
    186        
     186
    187187        // Disable player and game options controls
    188188        // TODO: Shouldn't players be able to choose their own assignment?
     
    193193            getGUIObjectByName("playerTeam["+i+"]").hidden = true;
    194194        }
    195        
     195
    196196        getGUIObjectByName("numPlayersBox").hidden = true;
    197        
     197
    198198        // Disable "start game" button
    199199        // TODO: Perhaps replace this with a "ready" button, and require host to wait?
    200200        getGUIObjectByName("startGame").enabled = false;
    201201    }
    202    
     202
    203203    // Set up offline-only bits:
    204204    if (!g_IsNetworked)
     
    206206        getGUIObjectByName("chatPanel").hidden = true;
    207207    }
    208    
     208
    209209    // Settings for all possible player slots
    210210    var boxSpacing = 32;
     
    218218        boxSize.bottom = i * boxSpacing + h;
    219219        box.size = boxSize;
    220        
     220
    221221        // Populate team dropdowns
    222222        var team = getGUIObjectByName("playerTeam["+i+"]");
     
    224224        team.list_data = [-1, 0, 1, 2, 3];
    225225        team.selected = 0;
    226        
     226
    227227        let playerSlot = i; // declare for inner function use
    228228        team.onSelectionChange = function()
     
    232232                g_GameAttributes.settings.PlayerData[playerSlot].Team = this.selected - 1;
    233233            }
    234            
     234
    235235            if (!g_IsInGuiUpdate)
    236236            {
     
    238238            }
    239239        };
    240        
     240
    241241        // Set events
    242242        var civ = getGUIObjectByName("playerCiv["+i+"]");
     
    247247                g_GameAttributes.settings.PlayerData[playerSlot].Civ = this.list_data[this.selected];
    248248            }
    249            
     249
    250250            if (!g_IsInGuiUpdate)
    251251            {
     
    254254        };
    255255    }
    256    
     256
    257257    if (g_IsNetworked)
    258258    {
     
    282282            reportDisconnect(message.reason);
    283283            break;
    284        
     284
    285285        default:
    286286            error("Unrecognised netstatus type "+message.status);
     
    288288        }
    289289        break;
    290    
     290
    291291    case "gamesetup":
    292292        if (message.data) // (the host gets undefined data on first connect, so skip that)
     
    297297        onGameAttributesChange();
    298298        break;
    299    
     299
    300300    case "players":
    301301        // Find and report all joinings/leavings
     
    318318        updatePlayerList();
    319319        break;
    320    
     320
    321321    case "start":
    322322        Engine.SwitchGuiPage("page_loading.xml", {
    323             "attribs": g_GameAttributes, 
    324             "isNetworked" : g_IsNetworked, 
     323            "attribs": g_GameAttributes,
     324            "isNetworked" : g_IsNetworked,
    325325            "playerAssignments": g_PlayerAssignments
    326326        });
    327327        break;
    328    
     328
    329329    case "chat":
    330330        addChatMessage({ "type": "message", "guid": message.guid, "text": message.text });
     
    340340{
    341341    var mapData = loadMapData(map);
    342    
     342
    343343    if (!mapData || !mapData.settings || !mapData.settings.Name)
    344344    {   // Give some msg that map format is unsupported
     
    346346        return map;
    347347    }
    348    
     348
    349349    return mapData.settings.Name;
    350350}
     
    357357        return settings[property];
    358358    }
    359    
     359
    360360    // Use defaults
    361361    if (defaults && (property in defaults))
     
    363363        return defaults[property];
    364364    }
    365    
     365
    366366    return undefined;
    367367}
     
    372372    // Cache civ data
    373373    g_CivData = loadCivData();
    374    
     374
    375375    // Extract name/code, and skip civs that are explicitly disabled
    376376    // (intended for unusable incomplete civs)
     
    381381    // Alphabetically sort the list, ignoring case
    382382    civList.sort(sortNameIgnoreCase);
    383    
     383
    384384    var civListNames = [ civ.name for each (civ in civList) ];
    385385    var civListCodes = [ civ.code for each (civ in civList) ];
     
    402402    var mapSelectionBox = getGUIObjectByName("mapSelection")
    403403    var mapFiles;
    404    
     404
    405405    switch (g_GameAttributes.mapType)
    406406    {
     
    408408        mapFiles = getXMLFileList(g_GameAttributes.mapPath);
    409409        break;
    410    
     410
    411411    case "random":
    412412        mapFiles = getJSONFileList(g_GameAttributes.mapPath);
    413413        break;
    414        
     414
    415415    default:
    416416        error("initMapNameList: Unexpected map type '"+g_GameAttributes.mapType+"'");
    417417        return;
    418418    }
    419    
     419
    420420    // Apply map filter, if any defined
    421421    var mapList = [];
     
    424424        var file = mapFiles[i];
    425425        var mapData = loadMapData(file);
    426                
     426
    427427        if (g_GameAttributes.mapFilter && mapData && testFilter(g_GameAttributes.mapFilter, mapData.settings))
    428428        {
     
    430430        }
    431431    }
    432    
     432
    433433    // Alphabetically sort the list, ignoring case
    434434    mapList.sort(sortNameIgnoreCase);
    435    
     435
    436436    var mapListNames = [ map.name for each (map in mapList) ];
    437437    var mapListFiles = [ map.file for each (map in mapList) ];
    438    
     438
    439439    // Select the default map
    440440    var selected = mapListFiles.indexOf(g_GameAttributes.map);
     
    444444        selected = 0;
    445445    }
    446    
     446
    447447    // Update the list control
    448448    mapSelectionBox.list = mapListNames;
     
    457457        return undefined;
    458458    }
    459    
     459
    460460    if (!g_MapData[name])
    461461    {
     
    465465            g_MapData[name] = Engine.LoadMapSettings(g_GameAttributes.mapPath+name);
    466466            break;
    467            
     467
    468468        case "random":
    469469            g_MapData[name] = parseJSONData(g_GameAttributes.mapPath+name+".json");
    470470            break;
    471            
     471
    472472        default:
    473473            error("loadMapData: Unexpected map type '"+g_GameAttributes.mapType+"'");
     
    475475        }
    476476    }
    477    
     477
    478478    return g_MapData[name];
    479479}
     
    523523        return;
    524524    }
    525    
     525
    526526    // Network clients can't change number of players
    527527    if (g_IsNetworked && !g_IsController)
     
    529529        return;
    530530    }
    531    
     531
    532532    // Only meaningful for random maps
    533533    if (g_GameAttributes.mapType != "random")
     
    535535        return;
    536536    }
    537    
     537
    538538    // Update player data
    539539    var pData = g_GameAttributes.settings.PlayerData;
     
    551551        }
    552552    }
    553    
     553
    554554    updateGameAttributes();
    555555}
     
    576576    // Clear old map data
    577577    g_MapData = {};
    578    
     578
    579579    // Select correct path
    580580    switch (g_GameAttributes.mapType)
     
    586586        g_GameAttributes.mapPath = "maps/scenarios/";
    587587        break;
    588        
     588
    589589    case "random":
    590590        g_GameAttributes.mapPath = "maps/random/";
     
    594594        };
    595595        break;
    596        
     596
    597597    default:
    598598        error("selectMapType: Unexpected map type '"+g_GameAttributes.mapType+"'");
     
    618618        return;
    619619    }
    620    
     620
    621621    g_GameAttributes.mapFilter = filterName;
    622    
     622
    623623    initMapNameList();
    624624
     
    640640        return;
    641641    }
    642    
     642
    643643    // Return if we have no map
    644644    if (!name)
     
    649649    var mapData = loadMapData(name);
    650650    var mapSettings = (mapData && mapData.settings ? deepcopy(mapData.settings) : {});
    651    
     651
    652652    // Copy any new settings
    653653    g_GameAttributes.map = name;
     
    675675    {
    676676        var numPlayers = (mapSettings.PlayerData ? mapSettings.PlayerData.length : g_GameAttributes.settings.PlayerData.length);
    677        
     677
    678678        for (var guid in g_PlayerAssignments)
    679679        {   // Unassign extra players
     
    686686        }
    687687    }
    688    
     688
    689689    updateGameAttributes();
    690690}
     
    697697        return;
    698698    }
    699    
     699
    700700    // Check that we have a map
    701701    if (!g_GameAttributes.map)
     
    703703        return;
    704704    }
    705    
     705
    706706    if (g_IsNetworked)
    707707    {
     
    727727        Engine.StartGame(g_GameAttributes, playerID);
    728728        Engine.SwitchGuiPage("page_loading.xml", {
    729             "attribs": g_GameAttributes, 
    730             "isNetworked" : g_IsNetworked, 
     729            "attribs": g_GameAttributes,
     730            "isNetworked" : g_IsNetworked,
    731731            "playerAssignments": g_PlayerAssignments
    732732        });
     
    739739{
    740740    g_IsInGuiUpdate = true;
    741    
     741
    742742    // Don't set any attributes here, just show the changes in GUI
    743    
     743
    744744    var mapName = g_GameAttributes.map || "";
    745745    var mapSettings = g_GameAttributes.settings;
    746746    var numPlayers = (mapSettings.PlayerData ? mapSettings.PlayerData.length : MAX_PLAYERS);
    747    
     747
    748748    // Update some controls for clients
    749749    if (!g_IsController)
     
    757757        var mapSelectionBox = getGUIObjectByName("mapSelection");
    758758        mapSelectionBox.selected = mapSelectionBox.list_data.indexOf(mapName);
    759        
     759
    760760        initMapNameList();
    761761    }
    762    
     762
    763763    // Controls common to all map types
    764764    var revealMap = getGUIObjectByName("revealMap");
     
    774774    var sizeIdx = (g_MapSizes.tiles.indexOf(mapSettings.Size) != -1 ? g_MapSizes.tiles.indexOf(mapSettings.Size) : g_MapSizes.default);
    775775    var victoryIdx = (VICTORY_DATA.indexOf(mapSettings.GameType) != -1 ? VICTORY_DATA.indexOf(mapSettings.GameType) : VICTORY_DEFAULTIDX);
    776    
     776
    777777    // Handle map type specific logic
    778778    switch (g_GameAttributes.mapType)
     
    787787            victoryCondition.hidden = false;
    788788            lockTeams.hidden = false;
    789            
     789
    790790            mapSizeText.caption = "Map size:";
    791791            mapSize.selected = sizeIdx;
    792792            revealMapText.caption = "Reveal map:";
    793793            revealMap.checked = (mapSettings.RevealMap ? true : false);
    794            
     794
    795795            victoryConditionText.caption = "Victory condition:";
    796796            victoryCondition.selected = victoryIdx;
     
    805805            lockTeamsText.caption = "Teams locked: " + (mapSettings.LockTeams === undefined || mapSettings.LockTeams ? "Yes" : "No");
    806806        }
    807        
    808         break;
    809    
     807
     808        break;
     809
    810810    case "scenario":
    811811        // For scenario just reflect settings for the current map
     
    815815        victoryCondition.hidden = true;
    816816        lockTeams.hidden = true;
    817        
     817
    818818        mapSizeText.caption = "Map size: Default";
    819819        revealMapText.caption = "Reveal map: " + (mapSettings.RevealMap ? "Yes" : "No");
    820820        victoryConditionText.caption = "Victory condition: " + VICTORY_TEXT[victoryIdx];
    821821        lockTeamsText.caption = "Teams locked: " + (mapSettings.LockTeams === undefined || mapSettings.LockTeams  ? "Yes" : "No");
    822        
    823         break;
    824        
     822
     823        break;
     824
    825825    default:
    826826        error("onGameAttributesChange: Unexpected map type '"+g_GameAttributes.mapType+"'");
    827827        return;
    828828    }
    829    
     829
    830830    // Display map name
    831831    getGUIObjectByName("mapInfoName").caption = getMapDisplayName(mapName);
    832    
     832
    833833    // Load the description from the map file, if there is one
    834834    var description = mapSettings.Description || "Sorry, no description available.";
    835    
     835
    836836    // Describe the number of players
    837837    var playerString = numPlayers + " " + (numPlayers == 1 ? "player" : "players") + ". ";
    838    
     838
    839839    for (var i = 0; i < MAX_PLAYERS; ++i)
    840840    {
    841841        // Show only needed player slots
    842842        getGUIObjectByName("playerBox["+i+"]").hidden = (i >= numPlayers);
    843        
     843
    844844        // Show player data or defaults as necessary
    845845        if (i < numPlayers)
     
    855855            var pData = mapSettings.PlayerData ? mapSettings.PlayerData[i] : {};
    856856            var pDefs = g_DefaultPlayerData ? g_DefaultPlayerData[i] : {};
    857            
     857
    858858            // Common to all game types
    859859            var color = iColorToString(getSetting(pData, pDefs, "Colour"));
    860860            pColor.sprite = "colour:"+color+" 100";
    861861            pName.caption = getSetting(pData, pDefs, "Name");
    862            
     862
    863863            var team = getSetting(pData, pDefs, "Team");
    864864            var civ = getSetting(pData, pDefs, "Civ");
    865            
     865
    866866            // For clients or scenarios, hide some player dropdowns
    867867            if (!g_IsController || g_GameAttributes.mapType == "scenario")
     
    871871                pTeamText.hidden = false;
    872872                pTeam.hidden = true;
    873                
     873
    874874                // Set text values
    875875                pCivText.caption = g_CivData[civ].Name;
     
    882882                pTeamText.hidden = true;
    883883                pTeam.hidden = false;
    884                
     884
    885885                // Set dropdown values
    886886                pCiv.selected = (civ ? pCiv.list_data.indexOf(civ) : 0);
     
    891891
    892892    getGUIObjectByName("mapInfoDescription").caption = playerString + description;
    893    
     893
    894894    g_IsInGuiUpdate = false;
    895895
     
    904904        Engine.SetNetworkGameAttributes(g_GameAttributes);
    905905    }
    906     else 
     906    else
    907907    {
    908908        onGameAttributesChange();
     
    919919    var aiAssignments = {};
    920920    var noAssignment;
    921    
     921
    922922    for (var guid in g_PlayerAssignments)
    923923    {
     
    925925        var hostID = hostNameList.length;
    926926        var player = g_PlayerAssignments[guid].player;
    927        
     927
    928928        hostNameList.push(name);
    929929        hostGuidList.push(guid);
     
    941941    hostNameList.push("[color=\"90 90 90 255\"]Unassigned");
    942942    hostGuidList.push("");
    943    
     943
    944944    for (var i = 0; i < MAX_PLAYERS; ++i)
    945945    {
    946946        let playerSlot = i;
    947947        let playerID = i+1; // we don't show Gaia, so first slot is ID 1
    948        
     948
    949949        var selection = assignments[playerID];
    950        
     950
    951951        var configButton = getGUIObjectByName("playerConfig["+i+"]");
    952952        configButton.hidden = true;
     
    967967                    selection = noAssignment;
    968968                }
    969                
     969
    970970                // Since no human is assigned, show the AI config button
    971971                if (g_IsController)
     
    10061006                }
    10071007            }
    1008            
     1008
    10091009            var assignBox = getGUIObjectByName("playerAssignment["+i+"]");
    10101010            assignBox.list = hostNameList;
     
    10971097    var username = escapeText(msg.username || g_PlayerAssignments[msg.guid].name);
    10981098    var message = escapeText(msg.text);
    1099    
     1099
    11001100    // TODO: Maybe host should have distinct font/color?
    1101     var color = "0 0 0";
    1102    
     1101    var color = "white";
     1102
    11031103    if (g_PlayerAssignments[msg.guid] && g_PlayerAssignments[msg.guid].player != 255)
    11041104    {   // Valid player who has been assigned - get player colour
     
    11091109        var pData = mapSettings.PlayerData ? mapSettings.PlayerData[player] : {};
    11101110        var pDefs = g_DefaultPlayerData ? g_DefaultPlayerData[player] : {};
    1111        
     1111
    11121112        color = iColorToString(getSetting(pData, pDefs, "Colour"));
    11131113    }
    1114    
     1114
    11151115    var formatted;
    11161116    switch (msg.type)
    11171117    {
    11181118    case "connect":
    1119         formatted = '[font="serif-bold-13"][color="'+ color +'"]' + username + '[/color][/font] [color="64 64 64"]has joined[/color]';
     1119        formatted = '[font="serif-bold-13"][color="'+ color +'"]' + username + '[/color][/font] [color="gold"]has joined[/color]';
    11201120        break;
    11211121
    11221122    case "disconnect":
    1123         formatted = '[font="serif-bold-13"][color="'+ color +'"]' + username + '[/color][/font] [color="64 64 64"]has left[/color]';
     1123        formatted = '[font="serif-bold-13"][color="'+ color +'"]' + username + '[/color][/font] [color="gold"]has left[/color]';
    11241124        break;
    11251125
     
    11491149        newFilter.name = name;
    11501150        newFilter.filter = filterFunc;
    1151        
     1151
    11521152        g_MapFilters.push(newFilter);
    11531153    }
     
    11661166        filters.push(g_MapFilters[i].name);
    11671167    }
    1168    
     1168
    11691169    return filters;
    11701170}
     
    11801180        }
    11811181    }
    1182    
     1182
    11831183    error("Invalid map filter: "+name);
    11841184    return false;
     
    11921192        return false;
    11931193    }
    1194    
     1194
    11951195    for (var m = 0; m < matches.length; ++m)
    11961196    {   // Fail on not match
     
    12101210        return false;
    12111211    }
    1212    
     1212
    12131213    for (var m = 0; m < matches.length; ++m)
    12141214    {   // Success on match
  • ps/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.xml

    r10122 r10130  
    1212    <object type="image" z="0" sprite="BackgroundBlack"/>
    1313
    14     <object type="image" style="StonePanel" size="50%-190 50%-80 50%+190 50%+80" name="loadingWindow">
     14    <object type="image" style="StonePanelLight" size="50%-190 50%-80 50%+190 50%+80" name="loadingWindow">
    1515
    1616        <object type="text" style="StoneDialogTitleBar" size="50%-128 0%-16 50%+128 16">
     
    3636        <!-- Map selection -->
    3737        <object size="20 64 250 100%-20">
    38            
     38
    3939                        <object size="0 0 40% 100%">
    4040                                <object name="mapTypeHeading" type="text" style="RightLabelText" size="0 0 100% 28">Match Type:</object>
    4141                                <object name="mapFilterHeading" type="text" style="RightLabelText" size="0 34 100% 60">Map Filter:</object>
    4242                        </object>
    43                        
     43
    4444                        <object name="mapTypeSelection"
    4545                type="dropdown"
     
    5050                <action on="SelectionChange">selectMapType(this.list_data[this.selected]);</action>
    5151            </object>
    52                        
     52
    5353            <object name="mapFilterSelection"
    5454                type="dropdown"
     
    5959                <action on="SelectionChange">selectMapFilter(this.list[this.selected]);</action>
    6060            </object>
    61          
     61
    6262            <object name="mapSelection"
    6363                style="StoneList"
     
    6868                <action on="SelectionChange">selectMap(this.list_data[this.selected]);</action>
    6969            </object>
    70            
     70
    7171            <object type="image" sprite="BackgroundIndentFillDark" size="0 100%-190 100% 100%">
    7272                <object name="mapInfoName" type="text" style="LeftLabelText" size="0 0 100% 30"/>
    7373                <object name="mapInfoDescription" type="text" style="SmallLeftLabelText" size="0 24 100% 100%"/>
    7474            </object>
    75    
     75
    7676        </object>
    7777
     
    125125            </object>
    126126        </object>
    127                
    128                
     127
     128
    129129        <!-- Options -->
    130130        <object name="gameOptionsBox" size="260 100%-260 100% 100%-190">
     
    142142            </object>
    143143        </object>
    144        
    145        
     144
     145
    146146        <!-- Chat window -->
    147147        <object name="chatPanel" size="260 100%-190 100%-20 100%-58" type="image" sprite="BackgroundIndentFillDark">
    148    
     148
    149149            <object name="chatText" size="3 1 100%-1 100%-25" type="text" style="chatPanel"/>
    150    
     150
    151151            <object name="chatInput" size="2 100%-23 100%-66 100%-3" type="input" style="StoneInput">
    152152                <action on="Press">submitChatInput();</action>
    153153            </object>
    154    
     154
    155155            <object size="100%-65 100%-23 100% 100%-3" type="button" style="StoneButton">
    156156                Send
    157157                <action on="Press">submitChatInput();</action>
    158158            </object>
    159    
     159
    160160        </object>
    161161
     
    170170            size="260 100%-64 100%-310 100%-16"
    171171        >[Tooltip text]</object>
    172    
     172
    173173        <object
    174174            name="cancelGame"
     
    184184            ]]></action>
    185185        </object>
    186    
     186
    187187        <object
    188188            name="startGame"
     
    195195            <action on="Press">launchGame();</action>
    196196        </object>
    197        
     197
    198198    </object>
    199199
  • ps/trunk/binaries/data/mods/public/gui/gamesetup/styles.xml

    r7664 r10130  
    33<styles>
    44
    5     <style name="indentedPanel"
     5<!--    <style name="indentedPanel"
    66        buffer_zone="5"
    77        font="serif-14"
     
    1111        text_align="left"
    1212        text_valign="center"
    13     />
     13    />-->
    1414
    1515    <style name="chatPanel"
     
    1717        font="serif-13"
    1818        scrollbar="true"
    19         scrollbar_style="wheatScrollBar"
     19        scrollbar_style="StoneScrollBar"
    2020        scroll_bottom="true"
    21         textcolor="black"
    22         textcolor_selected="white"
     21        textcolor="white"
     22        textcolor_selected="gold"
    2323        text_align="left"
    2424        text_valign="center"
  • ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.xml

    r10122 r10130  
    1212    -->
    1313
    14     <object type="image" sprite="bkFillBlack"/>
     14    <object type="image" sprite="BackgroundBlack"/>
    1515
    1616    <object name="pg">
     
    8585You can automatically send us anonymous feedback that will help us fix bugs, and improve performance and compatibility.
    8686            </object>
    87             <object type="button" style="wheatButton" size="4 100%-36 150 100%-4">
    88                 [font="serif-bold-16"]Enable feedback
     87            <object type="button" style="StoneButton" size="8 100%-36 146 100%-8">
     88                Enable feedback
    8989                <action on="Press">Engine.SetUserReportEnabled(true);</action>
    9090            </object>
    91             <object type="button" style="wheatButton" size="100%-150 100%-36 100%-4 100%-4">
     91            <object type="button" style="StoneButton" size="100%-146 100%-36 100%-8 100%-8">
    9292                Technical details
    9393                <action on="Press">Engine.PushGuiPage("page_manual.xml", { "page": "userreport" });</action>
     
    126126                size="4 130 100%-4 200"
    127127                type="input"
    128                 style="wheatInput"
     128                style="StoneInput"
    129129                multiline="true"
    130130                scrollbar="true"
    131                 scrollbar_style="wheatScrollBar"
     131                scrollbar_style="StoneScrollBar"
    132132            />
    133133
    134             <object size="100%-124 204 100%-4 236" type="button" style="wheatButton">
     134            <object size="100%-124 204 100%-4 232" type="button" style="StoneButton">
    135135                Send Message
    136136                <action on="Press">submitUserReportMessage();</action>
    137137            </object>
    138138
    139             <object type="button" style="wheatButton" size="4 100%-36 150 100%-4">
     139            <object type="button" style="StoneButton" size="8 100%-36 146 100%-8">
    140140                Disable feedback
    141141                <action on="Press">Engine.SetUserReportEnabled(false);</action>
    142142            </object>
    143             <object type="button" style="wheatButton" size="100%-150 100%-36 100%-4 100%-4">
     143            <object type="button" style="StoneButton" size="100%-146 100%-36 100%-8 100%-8">
    144144                Technical details
    145145                <action on="Press">Engine.PushGuiPage("page_manual.xml", { "page": "userreport" });</action>
    146146            </object>
    147147        </object>
    148              
     148
    149149
    150150        <!--
     
    170170                                size="100%-2 0 100% 100%"
    171171                        />
    172                    
     172
    173173                        <object name="productLogo"
    174174                                type="image"
     
    177177                                size="50%-110 30 50%+110 130"
    178178                        />
    179                        
     179
    180180                        <object name="mainMenuButtons"
    181181                                type="image"
     
    189189                                        ghost="false"
    190190                                />
    191                            
     191
    192192                                <!-- LEARN TO PLAY BUTTON -->
    193193                <object name="menuLearnToPlayButton"
     
    206206                                        </action>
    207207                               </object>
    208                            
     208
    209209                               <!-- SINGLEPLAYER BUTTON -->
    210210                               <object name="menuSinglePlayerButton"
     
    222222                                        </action>
    223223                                </object>
    224                                
     224
    225225                                <!-- MULTIPLAYER BUTTON -->
    226226                                <object name="menuMultiplayerButton"
     
    238238                                        </action>
    239239                                </object>
    240                                
     240
    241241                                <!-- TOOLS AND OPTIONS BUTTON -->
    242242                                <object name="menuToolsAndOptionsButton"
     
    254254                                        </action>
    255255                                </object>
    256                                
     256
    257257                                <!-- HISTORY BUTTON -->
    258258                                <object name="menuHistoryButton"
     
    271271                                        </action>
    272272                                </object>
    273                                
     273
    274274                                <!-- EXIT BUTTON -->
    275275                                <object name="menuExitButton"
     
    292292                        </object>
    293293
    294             <!-- PRE-RELEASE INFO --> 
     294            <!-- PRE-RELEASE INFO -->
    295295            <object size="8 100%-340 100%-8 100%-100"
    296                 type="image" 
     296                type="image"
    297297                style="TranslucentPanelThinBorder"
    298298            >
    299299
    300                 <!-- PRE-RELEASE WARNING --> 
    301                 <object 
    302                     style="fancyTextHeadWhite"
    303                     type="text" 
     300                <!-- PRE-RELEASE WARNING -->
     301                <object
     302                    font="serif-14"
     303                    type="text"
    304304                    textcolor="white"
    305305                    size="8 8 100%-8 100%-36"
    306306                                        ghost="true"
    307                 > 
     307                >
    308308[font="serif-bold-18"]Alpha Version[/font]
    309309
    310 WARNING: This is an early development version of the game. Many features have not been added yet. 
    311 
    312 Get involved at: wildfiregames.com/0ad 
    313                 </object>
    314 
    315                 <!-- CONTACT METHODS --> 
    316                 <object type="button" 
     310WARNING: This is an early development version of the game. Many features have not been added yet.
     311
     312Get involved at: wildfiregames.com/0ad
     313                </object>
     314
     315                <!-- CONTACT METHODS -->
     316                <object type="button"
    317317                    style="StoneButton"
    318318                                        tooltip_style="pgToolTip"
    319319                                        tooltip="Click to open wildfiregames.com/0ad in your web browser."
    320320                    size="8 100%-36 50%-4 100%-8"
    321                 > 
    322                     Website 
    323                     <action on="Press"><![CDATA[ 
    324                         var url = "http://wildfiregames.com/0ad/"; 
    325                         Engine.OpenURL(url); 
    326                         messageBox(400, 200, "Opening "+url+" in default web browser. Please wait...", "Opening page", 2); 
    327                     ]]></action> 
    328                 </object> 
    329          
     321                >
     322                    Website
     323                    <action on="Press"><![CDATA[
     324                        var url = "http://wildfiregames.com/0ad/";
     325                        Engine.OpenURL(url);
     326                        messageBox(400, 200, "Opening "+url+" in default web browser. Please wait...", "Opening page", 2);
     327                    ]]></action>
     328                </object>
     329
    330330                <object type="button"
    331331                    style="StoneButton"
    332332                                        tooltip_style="pgToolTip"
    333333                                        tooltip="Click to chat in IRC. (#0ad at webchat.quakenet.org)"
    334                     size="50%+4 100%-36 100%-8 100%-8" 
    335                 > 
    336                     IRC 
    337                     <action on="Press"><![CDATA[ 
    338                         var url = "http://webchat.quakenet.org/?channels=0ad"; 
    339                         Engine.OpenURL(url); 
    340                         messageBox(400, 200, "Opening "+url+" in default web browser. Please wait...", "Opening page", 2); 
    341                     ]]></action> 
    342                 </object> 
    343             </object> 
     334                    size="50%+4 100%-36 100%-8 100%-8"
     335                >
     336                    IRC
     337                    <action on="Press"><![CDATA[
     338                        var url = "http://webchat.quakenet.org/?channels=0ad";
     339                        Engine.OpenURL(url);
     340                        messageBox(400, 200, "Opening "+url+" in default web browser. Please wait...", "Opening page", 2);
     341                    ]]></action>
     342                </object>
     343            </object>
    344344
    345345            <!-- LOGO AND BUILD VERSION -->
     
    376376                ]]></action>
    377377            </object>
    378                        
     378
    379379                </object>
    380                
    381                
     380
     381
    382382                <!--
    383383        ==========================================
     
    385385        ==========================================
    386386        -->
    387                
     387
    388388                <object name="submenuScreen"
    389389            type="image"
     
    395395                                getGUIObjectByName("MainMenuPanelRightBorderTop").size = "100%-2 0 100% 100%";
    396396            </action>
    397                        
     397
    398398                        <!-- submenu -->
    399399                        <object name="submenu"
     
    443443                                        </object>
    444444                                </object>
    445                                
     445
    446446                                <!-- submenuMultiplayer -->
    447447                                <object name="submenuMultiplayer"
     
    467467                                                ]]></action>
    468468                                        </object>
    469                                        
     469
    470470                                        <object name="subMenuMultiplayerHostButton"
    471471                                                type="button"
     
    532532                        </object><!-- end of submenu -->
    533533                </object><!-- end of submenu screen -->
    534                
    535                
    536                
    537                
    538                
    539                
    540                
    541                
    542                
    543                
    544                
    545                
    546                
     534
     535
     536
     537
     538
     539
     540
     541
     542
     543
     544
     545
     546
    547547<!--
    548548        <object name="pgCampaignsBt"
     
    635635
    636636
    637              
     637
    638638
    639639
     
    668668                var creditsArray  = readFileLines("gui/text/credits.txt");
    669669
    670                 // Populate credits list.       
     670                // Populate credits list.
    671671                for (var creditsIndex = 0; creditsIndex < creditsArray.length; creditsIndex++)
    672672                {
     
    736736        z="90"
    737737        hidden="true"
    738         sprite="bkTranslucent" 
     738        sprite="bkTranslucent"
    739739    >-->
    740740
     
    765765                ]]></action>
    766766            </object>
    767 -->     
     767-->
    768768            <!-- Add campaign screen controls here later -->
    769 <!--       
     769<!--
    770770        </object>
    771771-->
     
    832832                            g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
    833833                        }
    834                     ]]></action>   
     834                    ]]></action>
    835835                </object>
    836836-->
     
    912912                            g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
    913913                        }
    914                     ]]></action>   
     914                    ]]></action>
    915915                </object>
    916916-->
     
    988988//                          g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
    989989                        }
    990                     ]]></action>   
     990                    ]]></action>
    991991                </object>
    992992-->
     
    10641064//                          g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
    10651065                        }
    1066                     ]]></action>   
     1066                    ]]></action>
    10671067                </object>
    10681068-->
     
    11391139//                          g_ConfigDB.system["sound.mastergain"] = getGUIObjectByName ("pgOptionsAudioMusicGain").caption;
    11401140                        }
    1141                     ]]></action>   
     1141                    ]]></action>
    11421142                </object>
    11431143
     
    14871487                    size="80% 91% 99% 99%"
    14881488                    tooltip="Display System Information."
    1489                     tooltip_style="pgFloatingToolTip"               
     1489                    tooltip_style="pgFloatingToolTip"
    14901490                >System Info
    14911491                    <action on="Press"><![CDATA[
     
    15381538                    <action on="Press"><![CDATA[
    15391539                        // Clicking the checkbox reverses the buttons
    1540                     ]]></action>   
     1540                    ]]></action>
    15411541                </object>
    15421542
     
    15841584                ]]></action>
    15851585            </object>
    1586 --> 
     1586-->
    15871587            <!--
    15881588            ===============================================
     
    16191619                size="60% 92% 90% 100%"
    16201620                tooltip="Close Options Screen, abandoning all changes."
    1621                 tooltip_style="pgFloatingToolTip"               
     1621                tooltip_style="pgFloatingToolTip"
    16221622            >Cancel
    16231623                <action on="Press"><![CDATA[
    1624                     // Close Options Screen, abandoning all changes.               
     1624                    // Close Options Screen, abandoning all changes.
    16251625                    closeMainMenuSubWindow ("pgOptions");
    16261626                ]]></action>
    16271627            </object>
    1628            
    1629         </object>                       
     1628
     1629        </object>
    16301630-->
    16311631        <!--
     
    16801680<!--END OF pgSubWindow-->
    16811681<!--    </object>-->
    1682        
     1682
    16831683</objects>
  • ps/trunk/binaries/data/mods/public/gui/session/session.xml

    r10122 r10130  
    3333        <!-- HOTKEYS (For some reason, they won't work properly unless outside menu) -->
    3434        <!-- ================================  ================================ -->
    35        
     35
    3636        <!-- Exit button Hotkey  -->
    3737            <!--
     
    3939                    messageBox(400, 200, "Do you really want to quit?", "Confirmation", 0,
    4040                        ["Yes", "No!"], [leaveGame, null]);
    41                 ]]></action> 
     41                ]]></action>
    4242            -->
    43        
     43
    4444        <object hotkey="leave">
    4545            <action on="Press">escapeKeyAction();</action>
     
    6060            <action on="Press">togglePause();</action>
    6161        </object>
    62        
     62
    6363        <!-- Delete button Hotkey (For some reason it won't work when the console is visible -->
    6464        <object hotkey="session.kill">
     
    7070            <action on="Press">setCameraFollow(g_Selection.toList()[0]);</action>
    7171        </object>
    72        
     72
    7373        <!-- Find idle warrior - TODO: Potentially move this to own UI button? -->
    7474        <object hotkey="selection.idlewarrior">
    7575            <action on="Press">findIdleUnit(["Hero", "Super", "CitizenSoldier", "Siege", "Warship"]);</action>
    7676        </object>
    77        
     77
    7878        <!-- ================================  ================================ -->
    7979        <!-- Developer / Debug items -->
    8080        <!-- ================================  ================================ -->
    81        
     81
    8282        <!-- Debug text -->
    8383        <object name="debug"
     
    9797
    9898            <object size="0 0 100%-18 16" type="text" style="devCommandsText">Control all units</object>
    99             <object size="100%-16 0 100% 16" type="checkbox" name="devControlAll" style="wheatCrossBox">
     99            <object size="100%-16 0 100% 16" type="checkbox" name="devControlAll" style="StoneCrossBox">
    100100                <action on="Press">
    101101                    g_DevSettings.controlAll = this.checked;
     
    105105
    106106            <object size="0 16 100%-18 32" type="text" style="devCommandsText">Display selection state</object>
    107             <object size="100%-16 16 100% 32" type="checkbox" name="devDisplayState" style="wheatCrossBox"/>
     107            <object size="100%-16 16 100% 32" type="checkbox" name="devDisplayState" style="StoneCrossBox"/>
    108108
    109109            <object size="0 32 100%-18 48" type="text" style="devCommandsText">Pathfinder overlay</object>
    110             <object size="100%-16 32 100% 48" type="checkbox" style="wheatCrossBox">
     110            <object size="100%-16 32 100% 48" type="checkbox" style="StoneCrossBox">
    111111                <action on="Press">Engine.GuiInterfaceCall("SetPathfinderDebugOverlay", this.checked);</action>
    112112            </object>
    113113
    114114            <object size="0 48 100%-18 64" type="text" style="devCommandsText">Obstruction overlay</object>
    115             <object size="100%-16 48 100% 64" type="checkbox" style="wheatCrossBox">
     115            <object size="100%-16 48 100% 64" type="checkbox" style="StoneCrossBox">
    116116                <action on="Press">Engine.GuiInterfaceCall("SetObstructionDebugOverlay", this.checked);</action>
    117117            </object>
    118118
    119119            <object size="0 64 100%-18 80" type="text" style="devCommandsText">Unit motion overlay</object>
    120             <object size="100%-16 64 100% 80" type="checkbox" style="wheatCrossBox">
     120            <object size="100%-16 64 100% 80" type="checkbox" style="StoneCrossBox">
    121121                <action on="Press">g_Selection.SetMotionDebugOverlay(this.checked);</action>
    122122            </object>
    123123
    124124            <object size="0 80 100%-18 96" type="text" style="devCommandsText">Range overlay</object>
    125             <object size="100%-16 80 100% 96" type="checkbox" style="wheatCrossBox">
     125            <object size="100%-16 80 100% 96" type="checkbox" style="StoneCrossBox">
    126126                <action on="Press">Engine.GuiInterfaceCall("SetRangeDebugOverlay", this.checked);</action>
    127127            </object>
    128128
    129129            <object size="0 96 100%-18 112" type="text" style="devCommandsText">Restrict camera</object>
    130             <object size="100%-16 96 100% 112" type="checkbox" style="wheatCrossBox" checked="true">
     130            <object size="100%-16 96 100% 112" type="checkbox" style="StoneCrossBox" checked="true">
    131131                <action on="Press">gameView.constrainCamera = this.checked;</action>
    132132            </object>
    133133
    134134            <object size="0 112 100%-18 128" type="text" style="devCommandsText">Reveal map</object>
    135             <object name="devCommandsRevealMap" size="100%-16 112 100% 128" type="checkbox" style="wheatCrossBox">
     135            <object name="devCommandsRevealMap" size="100%-16 112 100% 128" type="checkbox" style="StoneCrossBox">
    136136                <action on="Press">Engine.PostNetworkCommand({"type": "reveal-map", "enable": this.checked});</action>
    137137            </object>
    138138
    139139            <object size="0 128 100%-18 144" type="text" style="devCommandsText">Enable time warp</object>
    140             <object size="100%-16 128 100% 144" type="checkbox" name="devTimeWarp" style="wheatCrossBox">
     140            <object size="100%-16 128 100% 144" type="checkbox" name="devTimeWarp" style="StoneCrossBox">
    141141                <action on="Press">Engine.EnableTimeWarpRecording(this.checked ? 10 : 0);</action>
    142142            </object>
    143143
    144144            <object size="0 144 100%-18 160" type="text" style="devCommandsText">Promote selected units</object>
    145             <object size="100%-16 144 100% 160" type="button" style="wheatCrossBox">
     145            <object size="100%-16 144 100% 160" type="button" style="StoneCrossBox">
    146146                <action on="Press">Engine.PostNetworkCommand({"type": "promote", "entities": g_Selection.toList()});</action>
    147147            </object>
     
    195195
    196196        </object>
    197        
     197
    198198        <!-- ================================  ================================ -->
    199199        <!-- Menu -->
     
    207207                                closeMenu();
    208208            </action>
    209                        
     209
    210210                        <object name="menu"
    211211                                style="StonePanelThinBorder"
     
    215215                        >
    216216                                <object size="4 36 100%-4 50%+20">
    217                                    
     217
    218218                                        <!-- Settings button -->
    219219                                        <object type="button"
     
    285285                <object name="sessionDialogTitle" type="text" style="TitleText" size="0 -2 100% 100%">Settings</object>
    286286            </object>
    287                        
     287
    288288                        <object style="TranslucentPanelThinBorder"
    289289                                type="image"
     
    292292                                <!-- Settings / shadows -->
    293293                                <object size="0 10 100%-80 35" type="text" style="RightLabelText" ghost="true">Enable Shadows</object>
    294                                 <object name="shadowsCheckbox" size="100%-56 15 100%-30 40" type="checkbox" style="wheatCrossBox" checked="true">
     294                                <object name="shadowsCheckbox" size="100%-56 15 100%-30 40" type="checkbox" style="StoneCrossBox" checked="true">
    295295                                        <action on="Load">if (renderer.shadows) this.checked = true; else this.checked = false;</action>
    296296                                        <action on="Press">renderer.shadows = this.checked;</action>
    297                                 </object>   
     297                                </object>
    298298
    299299                                <!-- Settings / Shadow PCF -->
    300300                                <object size="0 35 100%-80 60" type="text" style="RightLabelText" ghost="true">Enable Shadow Filtering</object>
    301                                 <object name="shadowPCFCheckbox" size="100%-56 40 100%-30 65" type="checkbox" style="wheatCrossBox" checked="true">
     301                                <object name="shadowPCFCheckbox" size="100%-56 40 100%-30 65" type="checkbox" style="StoneCrossBox" checked="true">
    302302                                        <action on="Load">if (renderer.shadowPCF) this.checked = true; else this.checked = false;</action>
    303303                                        <action on="Press">renderer.shadowPCF = this.checked;</action>
     
    306306                                <!-- Settings / Water -->
    307307                                <object size="0 60 100%-80 85" type="text" style="RightLabelText" ghost="true">Enable Water Reflections</object>
    308                                 <object name="fancyWaterCheckbox" size="100%-56 65 100%-30 90"  type="checkbox" style="wheatCrossBox" checked="true">
     308                                <object name="fancyWaterCheckbox" size="100%-56 65 100%-30 90"  type="checkbox" style="StoneCrossBox" checked="true">
    309309                                        <action on="Load">if (renderer.fancyWater) this.checked = true; else this.checked = false;</action>
    310310                                        <action on="Press">renderer.fancyWater = this.checked;</action>
     
    313313                                <!-- Settings / Music-->
    314314                                <object size="0 85 100%-80 110" type="text" style="RightLabelText" ghost="true">Enable Music</object>
    315                                 <object size="100%-56 90 100%-30 115" type="checkbox" style="wheatCrossBox" checked="true">
     315                                <object size="100%-56 90 100%-30 115" type="checkbox" style="StoneCrossBox" checked="true">
    316316                                        <action on="Press">if (this.checked) startMusic(); else stopMusic();</action>
    317317                                </object>
     
    319319                                <!-- Settings / Dev Overlay -->
    320320                                <object size="0 110 100%-80 135" type="text" style="RightLabelText" ghost="true">Developer Overlay</object>
    321                                         <object size="100%-56 115 100%-30 140" type="checkbox" style="wheatCrossBox" checked="false">
     321                                        <object size="100%-56 115 100%-30 140" type="checkbox" style="StoneCrossBox" checked="false">
    322322                                        <action on="Press">toggleDeveloperOverlay();</action>
    323323                                </object>
    324324                        </object>
    325                        
     325
    326326                        <!-- Close button -->
    327327                        <object type="button"
     
    348348        <object
    349349            size="10 0 45% 100%"
    350         >   
     350        >
    351351            <!-- Food -->
    352352            <object size="0 0 90 100%" type="image" style="resourceCounter" tooltip="Food" tooltip_style="sessionToolTipBold">
     
    389389        <!-- ================================  ================================ -->
    390390        <!--<object size="50%+50 4 50%+300 100%-2" name="PhaseTitleBar" type="text" font="serif-bold-stroke-14" textcolor="white"> Death Match :: Village Phase</object>-->
    391        
    392                
     391
     392
    393393                <!-- ================================  ================================ -->
    394394        <!-- ALPHA LABELS (alpha, build time, revision) -->
    395395        <!-- ================================  ================================ -->
    396        
     396
    397397        <!-- Displays Alpha name and number -->
    398398        <object size="70%-128 0 70%+128 100%" name="alphaLabel" type="text" style="CenteredLabelText" text_valign="top" ghost="true">
    399399            ALPHA VI : Fortuna
    400                        
     400
    401401                        <!-- Displays build date and revision number-->
    402402                        <object size="50%-128 0 50%+128 100%-2" name="buildTimeLabel" type="text" text_align="center" text_valign="bottom" font="serif-12" textcolor="white" ghost="true">
     
    417417            <action on="Press">openMenu();</action>
    418418        </object> <!-- END OF MENU BUTTON -->
    419        
     419
    420420    </object> <!-- END OF TOP PANEL -->
    421421
     
    451451            sprite="mapPanel"
    452452            z="20"
    453         >   
     453        >
    454454            <object name="minimap"
    455455                type="minimap"
     
    494494                </object>
    495495            </object>
    496        
     496
    497497            <object name="unitGarrisonPanel"
    498498                size="24 12 100% 100%"
     
    535535            <!-- Unit details for Single Unit -->
    536536            <object size="50%-112 0 50%+112 100%" name="detailsAreaSingle">
    537    
     537
    538538                <!-- Player Name -->
    539539                <object size="0 0 100% 40" name="player" type="text" style="largeCenteredOutlinedText" tooltip_style="sessionToolTipBold"/>
    540    
     540
    541541                <!-- Stats -->
    542542                <object size="8 36 50%-48 100%" name="statsArea" type="image">
     
    559559                    <object type="image" sprite="glassSquareIcon" ghost="true"/>
    560560                </object>
    561                        
     561
    562562                <!-- Stats Bars -->
    563563                <object size= "50%+48 40 100% 136" type="image" tooltip_style="sessionToolTip">
     
    568568                        <object type="image" sprite="statsBarShader" ghost="true"/>
    569569                    </object>
    570                    
     570
    571571                    <!-- Stamina bar -->
    572572                    <object size="32 0 44 100%" type="image" name="stamina" tooltip="Stamina" tooltip_style="sessionToolTip">
     
    575575                        <object type="image" sprite="statsBarShader" ghost="true"/>
    576576                    </object>
    577                    
     577
    578578                    <!-- Resource bar -->
    579579                    <object size="18 0 30 100%" type="image" name="resources" tooltip="Resources" tooltip_style="sessionToolTip">
     
    582582                        <object type="image" sprite="statsBarShader" ghost="true"/>
    583583                    </object>
    584                    
     584
    585585                    <!-- Experience bar -->
    586586                    <object size="46 0 58 100%" type="image" name="experience" tooltip="Experience" tooltip_style="sessionToolTip">
     
    590590                    </object>
    591591                </object>
    592                
     592
    593593                <!-- Specific Name -->
    594594                <object size="0 142 100% 162" name="specific" type="text" style="largeCenteredOutlinedText" tooltip_style="sessionToolTipBold"/>
     
    597597            <!-- Unit details for Multiple Units -->
    598598            <object size="50%-112 0 50%+112 100%" name="detailsAreaMultiple">
    599                    
     599
    600600                <object name="unitSelectionPanel"
    601601                    size="20 12 100%-20 100%"
     
    611611                        </repeat>
    612612                    </object>
    613                 </object>   
     613                </object>
    614614
    615615                <!-- Total -->
    616616                <object size="100%-42 12 100%-8 46" type="image" sprite="groupsIcon">
    617617                    <object size="0 0 100% 100%" type="text" style="largeCenteredOutlinedText" name="numberOfUnits"/>
    618                 </object>   
     618                </object>
    619619
    620620                <!-- Stats Bars -->
     
    626626                        <object type="image" sprite="statsBarShader" ghost="true"/>
    627627                    </object>
    628                    
     628
    629629                    <!-- Stamina bar -->
    630630                    <object size="14 0 26 100%" type="image" name="staminaMultiple" tooltip="Stamina" tooltip_style="sessionToolTipBold">
     
    728728
    729729    </object><!-- END OF BOTTOM PANEL -->
    730        
     730
    731731    </object> <!-- END OF SN OBJECT -->
    732    
     732
    733733    <!-- ================================  ================================ -->
    734734    <!-- Selection bandbox -->
     
    750750                <action on="Press">leaveGame()</action>
    751751            </object>
    752    
     752
    753753    </object>
    754754
  • ps/trunk/binaries/data/mods/public/gui/summary/sprites.xml

    r10103 r10130  
    22
    33<sprites>
    4     <sprite name="bgInfoHeading">
    5         <image  backcolor="255 255 255 30" size="0 0 100% 100%" />
     4        <sprite name="TabSpacer">
     5                <image backcolor="gold" size="0 0 100% 100%"/>
    66    </sprite>
    7    
    8     <sprite name="bgInfoBox">
    9         <image  backcolor="50 35 0 100" size="0 0 100% 100%" />
     7
     8        <sprite name="ForegroundTab">
     9                <image backcolor="255 255 255 40" size="0 0 100% 100%"/>
     10                <image backcolor="gold" size="0 0 2 100%"/>
     11                <image backcolor="gold" size="2 0 100%-2 2"/>
     12                <image backcolor="gold" size="100%-2 0 100% 100%"/>
     13    </sprite>
     14
     15        <sprite name="BackgroundTab">
     16                <image backcolor="50 35 0 120" size="0 0 100% 100%"/>
     17                <image backcolor="gold" size="0 0 1 100%"/>
     18                <image backcolor="gold" size="1 0 100%-1 1"/>
     19                <image backcolor="gold" size="100%-1 0 100% 100%"/>
     20    </sprite>
     21
     22    <sprite name="ForegroundBody">
     23        <image backcolor="255 255 255 40" size="0 0 100% 100%"/>
     24                <image backcolor="gold" size="0 0 2 100%"/>
     25                <image backcolor="gold" size="2 100%-2 100%-2 100%"/>
     26                <image backcolor="gold" size="100%-2 0 100% 100%"/>
    1027    </sprite>
    1128</sprites>
  • ps/trunk/binaries/data/mods/public/gui/summary/summary.js

    r8690 r10130  
    2828        {
    2929            getGUIObjectByName(panelNames[i]).hidden = true;
    30             getGUIObjectByName(panelButtonNames[i]).sprite = "bgInfoHeading";
     30            getGUIObjectByName(panelButtonNames[i]).sprite = "BackgroundTab";
    3131        }
    3232        else
    33         {   
     33        {
    3434            getGUIObjectByName(panelNames[i]).hidden = false;
    35             getGUIObjectByName(panelButtonNames[i]).sprite = "bgInfoBox";
     35            getGUIObjectByName(panelButtonNames[i]).sprite = "ForegroundTab";
     36                        adjustTabDividers(getGUIObjectByName(panelButtonNames[i]).size);
    3637        }
    3738    }
    3839}
    3940
     41function adjustTabDividers(tabSize)
     42{
     43    var leftSpacer = getGUIObjectByName("tabDividerLeft");
     44    var rightSpacer = getGUIObjectByName("tabDividerRight");
     45    leftSpacer.size = "20 " + leftSpacer.size.top + " " + (tabSize.left + 2) + " " + leftSpacer.size.bottom;
     46    rightSpacer.size = (tabSize.right - 2) + " " + rightSpacer.size.top + " 100%-20 " + rightSpacer.size.bottom;
     47}
     48
    4049function init(data)
    4150{
     
    4554
    4655    getGUIObjectByName("summaryText").caption = data.gameResult;
    47    
    48     //Space player boxes
     56
     57    // Space player boxes
    4958    var boxSpacing = 32;
    5059    for (var i = 0; i < panelNames.length; ++i)
     60        {
    5161        for (var j = 0; j < MAX_SLOTS; ++j)
    5262        {
     
    5868            box.size = boxSize;
    5969        }
    60    
    61     // TODO set mapPlayers as playerCounters.length
     70        }
     71
     72    // TODO set maxPlayers as playerCounters.length
    6273    var maxPlayers = data.playerStates.length - 1;
    63    
    64     // align headers
    65     var left = 50; 
     74
     75    // Align headers
     76    var left = 50;
    6677    var width = 100;
    6778    var playerNameHeadingWidth = 200;
    68     getGUIObjectByName("playerName0Heading").size               = left + " 26 " + (left + playerNameHeadingWidth) + " 100%"; left += playerNameHeadingWidth;
    69     getGUIObjectByName("unitsTrainedHeading").size              = left + " 16 " + (left + width) + " 100%"; left += width;
    70     getGUIObjectByName("unitsLostHeading").size                 = left + " 16 " + (left + width) + " 100%"; left += width;
    71     getGUIObjectByName("enemyUnitsKilledHeading").size          = left + " 16 " + (left + width) + " 100%"; left += width;
    72     getGUIObjectByName("buildingsConstructedHeading").size      = left + " 16 " + (left + width) + " 100%"; left += width;
    73     getGUIObjectByName("buildingsLostHeading").size             = left + " 16 " + (left + width) + " 100%"; left += width;
    74     getGUIObjectByName("enemyBuildingsDestroyedHeading").size   = left +  " 6 " + (left + width) + " 100%"; left += width;
    75    
    76     var left = 50;
    77     getGUIObjectByName("playerName1Heading").size               = left + " 26 " + (left + playerNameHeadingWidth) + " 100%"; left += playerNameHeadingWidth;
    78     getGUIObjectByName("civCentresBuiltHeading").size           = left + " 16 " + (left + width) + " 100%"; left += width;
    79     getGUIObjectByName("enemyCivCentresDestroyedHeading").size  = left +  " 6 " + (left + width) + " 100%"; left += width;
    80     getGUIObjectByName("mapExplorationHeading").size            = left +  " 6 " + (left + width) + " 100%"; left += width;
    81    
    82     var left = 50;
    83     getGUIObjectByName("playerName2Heading").size           = left + " 26 " + (left + playerNameHeadingWidth) + " 100%"; left += playerNameHeadingWidth;
    84     getGUIObjectByName("foodGatheredHeading").size          = left + " 16 " + (left + width) + " 100%"; left += width;
    85     getGUIObjectByName("vegetarianRatioHeading").size       = left + " 16 " + (left + width) + " 100%"; left += width;
    86     getGUIObjectByName("woodGatheredHeading").size          = left + " 16 " + (left + width) + " 100%"; left += width;
    87     getGUIObjectByName("metalGatheredHeading").size         = left + " 16 " + (left + width) + " 100%"; left += width;
    88     getGUIObjectByName("stoneGatheredHeading").size         = left + " 16 " + (left + width) + " 100%"; left += width;
    89     getGUIObjectByName("treasuresCollectedHeading").size    = left + " 16 " + (left + width) + " 100%"; left += width;
    90    
     79    getGUIObjectByName("playerName0Heading").size = left + " 26 " + (left + playerNameHeadingWidth) + " 100%"; left += playerNameHeadingWidth;
     80    getGUIObjectByName("unitsTrainedHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     81    getGUIObjectByName("unitsLostHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     82    getGUIObjectByName("enemyUnitsKilledHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     83    getGUIObjectByName("buildingsConstructedHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     84    getGUIObjectByName("buildingsLostHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     85    getGUIObjectByName("enemyBuildingsDestroyedHeading").size = left +  " 6 " + (left + width) + " 100%"; left += width;
     86
     87    left = 50;
     88    getGUIObjectByName("playerName1Heading").size = left + " 26 " + (left + playerNameHeadingWidth) + " 100%"; left += playerNameHeadingWidth;
     89    getGUIObjectByName("civCentresBuiltHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     90    getGUIObjectByName("enemyCivCentresDestroyedHeading").size = left +  " 6 " + (left + width) + " 100%"; left += width;
     91    getGUIObjectByName("mapExplorationHeading").size = left +  " 6 " + (left + width) + " 100%"; left += width;
     92
     93    left = 50;
     94    getGUIObjectByName("playerName2Heading").size = left + " 26 " + (left + playerNameHeadingWidth) + " 100%"; left += playerNameHeadingWidth;
     95    getGUIObjectByName("foodGatheredHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     96    getGUIObjectByName("vegetarianRatioHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     97    getGUIObjectByName("woodGatheredHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     98    getGUIObjectByName("metalGatheredHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     99    getGUIObjectByName("stoneGatheredHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     100    getGUIObjectByName("treasuresCollectedHeading").size = left + " 16 " + (left + width) + " 100%"; left += width;
     101
    91102    // Show counters
    92103    for (var i = 0; i < MAX_SLOTS; ++i)
    93     {       
     104    {
    94105        if (i < maxPlayers)
    95106        {
    96107            var playerState = data.playerStates[i+1];
    97        
     108
    98109            for (var k = 0; k < panelNames.length; ++k)
    99110            {
    100111                var playerBox = getGUIObjectByName("playerBox"+k+"["+i+"]");
    101                 playerBox.hidden = false;       
    102                
    103                 var colourString = "colour: " 
    104                     + Math.floor(playerState.colour.r * 255) + " " 
    105                     + Math.floor(playerState.colour.g * 255) + " " 
     112                playerBox.hidden = false;
     113
     114                var colourString = "colour: "
     115                    + Math.floor(playerState.colour.r * 255) + " "
     116                    + Math.floor(playerState.colour.g * 255) + " "
    106117                    + Math.floor(playerState.colour.b * 255);
    107118                playerBox.sprite = colourString + " 32";
    108119                var playerColourBox = getGUIObjectByName("playerColourBox"+k+"["+i+"]");
    109120                playerColourBox.sprite = colourString + " 255";
    110            
     121
    111122                var playerName = getGUIObjectByName("playerName"+k+"["+i+"]");
    112123                playerName.caption = playerState.name;
    113                
    114                
     124
    115125                getGUIObjectByName("civIcon"+k+"["+i+"]").sprite = "stretched:"+civData[playerState.civ].Emblem;
    116126            }
    117            
    118             var unitsTrained                = getGUIObjectByName("unitsTrained["+i+"]");
    119             var unitsLost                   = getGUIObjectByName("unitsLost["+i+"]");
    120             var enemyUnitsKilled            = getGUIObjectByName("enemyUnitsKilled["+i+"]");
    121             var buildingsConstructed        = getGUIObjectByName("buildingsConstructed["+i+"]");
    122             var buildingsLost               = getGUIObjectByName("buildingsLost["+i+"]");
    123             var enemyBuildingsDestroyed     = getGUIObjectByName("enemyBuildingsDestroyed["+i+"]");
    124            
    125             var civCentresBuilt             = getGUIObjectByName("civCentresBuilt["+i+"]");
    126             var enemyCivCentresDestroyed    = getGUIObjectByName("enemyCivCentresDestroyed["+i+"]");
    127             var mapExploration              = getGUIObjectByName("mapExploration["+i+"]");
    128            
    129             var foodGathered                = getGUIObjectByName("foodGathered["+i+"]");
    130             var vegetarianRatio             = getGUIObjectByName("vegetarianRatio["+i+"]");
    131             var woodGathered                = getGUIObjectByName("woodGathered["+i+"]");
    132             var metalGathered               = getGUIObjectByName("metalGathered["+i+"]");
    133             var stoneGathered               = getGUIObjectByName("stoneGathered["+i+"]");
    134             var treasuresCollected          = getGUIObjectByName("treasuresCollected["+i+"]");
    135            
     127
     128            var unitsTrained = getGUIObjectByName("unitsTrained["+i+"]");
     129            var unitsLost = getGUIObjectByName("unitsLost["+i+"]");
     130            var enemyUnitsKilled = getGUIObjectByName("enemyUnitsKilled["+i+"]");
     131            var buildingsConstructed = getGUIObjectByName("buildingsConstructed["+i+"]");
     132            var buildingsLost = getGUIObjectByName("buildingsLost["+i+"]");
     133            var enemyBuildingsDestroyed = getGUIObjectByName("enemyBuildingsDestroyed["+i+"]");
     134
     135            var civCentresBuilt = getGUIObjectByName("civCentresBuilt["+i+"]");
     136            var enemyCivCentresDestroyed = getGUIObjectByName("enemyCivCentresDestroyed["+i+"]");
     137            var mapExploration = getGUIObjectByName("mapExploration["+i+"]");
     138
     139            var foodGathered = getGUIObjectByName("foodGathered["+i+"]");
     140            var vegetarianRatio = getGUIObjectByName("vegetarianRatio["+i+"]");
     141            var woodGathered = getGUIObjectByName("woodGathered["+i+"]");
     142            var metalGathered = getGUIObjectByName("metalGathered["+i+"]");
     143            var stoneGathered = getGUIObjectByName("stoneGathered["+i+"]");
     144            var treasuresCollected = getGUIObjectByName("treasuresCollected["+i+"]");
     145
    136146            // align counters
    137            
    138             var left = 240;
    139             var width = 100;
    140             unitsTrained.size               = left + " 2 " + (left + width) + " 100%"; left += width;
    141             unitsLost.size                  = left + " 2 " + (left + width) + " 100%"; left += width;
    142             enemyUnitsKilled.size           = left + " 2 " + (left + width) + " 100%"; left += width;
    143             buildingsConstructed.size       = left + " 2 " + (left + width) + " 100%"; left += width;
    144             buildingsLost.size              = left + " 2 " + (left + width) + " 100%"; left += width;
    145             enemyBuildingsDestroyed.size    = left + " 2 " + (left + width) + " 100%"; left += width;
    146             var size = getGUIObjectByName("playerBox0["+i+"]").size;
     147
     148            left = 240;
     149            width = 100;
     150            unitsTrained.size = left + " 2 " + (left + width) + " 100%"; left += width;
     151            unitsLost.size = left + " 2 " + (left + width) + " 100%"; left += width;
     152            enemyUnitsKilled.size = left + " 2 " + (left + width) + " 100%"; left += width;
     153            buildingsConstructed.size = left + " 2 " + (left + width) + " 100%"; left += width;
     154            buildingsLost.size = left + " 2 " + (left + width) + " 100%"; left += width;
     155            enemyBuildingsDestroyed.size = left + " 2 " + (left + width) + " 100%"; left += width;
     156            size = getGUIObjectByName("playerBox0["+i+"]").size;
    147157            size.right = left + 10;
    148158            getGUIObjectByName("playerBox0["+i+"]").size = size;
    149            
    150             var left = 240;
    151             civCentresBuilt.size            = left + " 2 " + (left + width) + " 100%"; left += width;
    152             enemyCivCentresDestroyed.size   = left + " 2 " + (left + width) + " 100%"; left += width;
    153             mapExploration.size             = left + " 2 " + (left + width) + " 100%"; left += width;
    154             var size = getGUIObjectByName("playerBox1["+i+"]").size;
     159
     160            left = 240;
     161            civCentresBuilt.size = left + " 2 " + (left + width) + " 100%"; left += width;
     162            enemyCivCentresDestroyed.size = left + " 2 " + (left + width) + " 100%"; left += width;
     163            mapExploration.size = left + " 2 " + (left + width) + " 100%"; left += width;
     164            size = getGUIObjectByName("playerBox1["+i+"]").size;
    155165            size.right = left + 10;
    156166            getGUIObjectByName("playerBox1["+i+"]").size = size;
    157            
    158             var left = 240;
    159             foodGathered.size       = left + " 2 " + (left + width) + " 100%"; left += width;
    160             vegetarianRatio.size    = left + " 2 " + (left + width) + " 100%"; left += width;
    161             woodGathered.size       = left + " 2 " + (left + width) + " 100%"; left += width;
    162             metalGathered.size      = left + " 2 " + (left + width) + " 100%"; left += width;
    163             stoneGathered.size      = left + " 2 " + (left + width) + " 100%"; left += width;
     167
     168            left = 240;
     169            foodGathered.size = left + " 2 " + (left + width) + " 100%"; left += width;
     170            vegetarianRatio.size = left + " 2 " + (left + width) + " 100%"; left += width;
     171            woodGathered.size = left + " 2 " + (left + width) + " 100%"; left += width;
     172            metalGathered.size = left + " 2 " + (left + width) + " 100%"; left += width;
     173            stoneGathered.size = left + " 2 " + (left + width) + " 100%"; left += width;
    164174            treasuresCollected.size = left + " 2 " + (left + width) + " 100%"; left += width;
    165             var size = getGUIObjectByName("playerBox2["+i+"]").size;
     175            size = getGUIObjectByName("playerBox2["+i+"]").size;
    166176            size.right = left + 10;
    167177            getGUIObjectByName("playerBox2["+i+"]").size = size;
    168            
     178
    169179            // display counters
    170             unitsTrained.caption                = playerState.statistics.unitsTrained;
    171             unitsLost.caption                   = playerState.statistics.unitsLost;
    172             enemyUnitsKilled.caption            = playerState.statistics.enemyUnitsKilled;
    173             buildingsConstructed.caption        = playerState.statistics.buildingsConstructed;
    174             buildingsLost.caption               = playerState.statistics.buildingsLost;
    175             enemyBuildingsDestroyed.caption     = playerState.statistics.enemyBuildingsDestroyed;
    176            
    177             civCentresBuilt.caption             = playerState.statistics.civCentresBuilt;
    178             enemyCivCentresDestroyed.caption    = playerState.statistics.enemyCivCentresDestroyed;
    179             mapExploration.caption              = playerState.statistics.percentMapExplored + "%";
    180            
    181             foodGathered.caption        = playerState.statistics.resourcesGathered.food;
    182             vegetarianRatio.caption     = Math.floor(playerState.statistics.resourcesGathered.food > 0 ?
     180            unitsTrained.caption = playerState.statistics.unitsTrained;
     181            unitsLost.caption = playerState.statistics.unitsLost;
     182            enemyUnitsKilled.caption = playerState.statistics.enemyUnitsKilled;
     183            buildingsConstructed.caption = playerState.statistics.buildingsConstructed;
     184            buildingsLost.caption = playerState.statistics.buildingsLost;
     185            enemyBuildingsDestroyed.caption = playerState.statistics.enemyBuildingsDestroyed;
     186
     187            civCentresBuilt.caption = playerState.statistics.civCentresBuilt;
     188            enemyCivCentresDestroyed.caption = playerState.statistics.enemyCivCentresDestroyed;
     189            mapExploration.caption = playerState.statistics.percentMapExplored + "%";
     190
     191            foodGathered.caption = playerState.statistics.resourcesGathered.food;
     192            vegetarianRatio.caption = Math.floor(playerState.statistics.resourcesGathered.food > 0 ?
    183193                (playerState.statistics.resourcesGathered.vegetarianFood / playerState.statistics.resourcesGathered.food) * 100 : 0) + "%";
    184             woodGathered.caption        = playerState.statistics.resourcesGathered.wood;
    185             metalGathered.caption       = playerState.statistics.resourcesGathered.metal;
    186             stoneGathered.caption       = playerState.statistics.resourcesGathered.stone;
    187             treasuresCollected.caption  = playerState.statistics.treasuresCollected;
     194            woodGathered.caption = playerState.statistics.resourcesGathered.wood;
     195            metalGathered.caption = playerState.statistics.resourcesGathered.metal;
     196            stoneGathered.caption = playerState.statistics.resourcesGathered.stone;
     197            treasuresCollected.caption = playerState.statistics.treasuresCollected;
    188198        }
    189199        else
     
    197207        }
    198208    }
    199 }
     209
     210        selectPanel(0);
     211}
  • ps/trunk/binaries/data/mods/public/gui/summary/summary.xml

    r10122 r10130  
    1010    <script file="gui/common/functions_civinfo.js"/>
    1111    <script file="gui/summary/summary.js"/>
    12     <object type="image" sprite="bkFillBlack">
     12    <object type="image" sprite="BackgroundBlack">
    1313
    1414        <object type="image"
     
    1919                Summary
    2020            </object>
    21            
    22             <object type="image" sprite="bgInfoHeading" size="16 16 100%-16 46">               
    23                 <object 
     21
     22            <object type="image" sprite="ForegroundBody" size="20 20 100%-20 50">
     23                <object
    2424                    name="summaryText"
    2525                    type="text"
     
    2929                    text_align="center"
    3030                />
    31            
    32                 <object 
     31
     32                <object
    3333                    name="timeElapsed"
    3434                    type="text"
     
    3939                />
    4040            </object>
    41            
    42            
    43             <object name="unitsBuildingsPanelButton" type="button" sprite="bgInfoBox" size="16 75 166 101">
     41
     42                        <object name="tabDividerLeft" type="image" sprite="TabSpacer" size="172 100 174 102"/>
     43                        <object name="tabDividerRight" type="image" sprite="TabSpacer" size="328 100 330 102"/>
     44
     45            <object name="unitsBuildingsPanelButton" type="button" sprite="ForegroundTab" size="20 75 170 100">
    4446                <action on="Press">selectPanel(0);</action>
    4547                <object type="text" style="TitleText" ghost="true">Units/buildings</object>
    4648            </object>
    47             <object name="conquestPanelButton" type="button" sprite="bgInfoHeading" size="172 75 322 101">
     49
     50            <object name="conquestPanelButton" type="button" sprite="BackgroundTab" size="176 75 326 100">
    4851                <action on="Press">selectPanel(1);</action>
    4952                <object type="text" style="TitleText" ghost="true">Conquest</object>
    5053            </object>
    51             <object name="resourcesPanelButton" type="button" sprite="bgInfoHeading" size="328 75 476 101">
     54
     55            <object name="resourcesPanelButton" type="button" sprite="BackgroundTab" size="332 75 480 100">
    5256                <action on="Press">selectPanel(2);</action>
    5357                <object type="text" style="TitleText" ghost="true">Resources</object>
    5458            </object>
    55             <object name="unitsBuildingsPanel" type="image" sprite="bgInfoBox" size="16 100 100%-16 100%-16">
    56                
     59
     60            <object name="unitsBuildingsPanel" type="image" sprite="ForegroundBody" size="20 100 100%-20 100%-48">
     61
    5762                <object size="0 0 100% 100%-50">
    5863                    <object name="playerName0Heading" type="text" style="LeftTabLabelText">
     
    7782                        Enemy&#10;buildings&#10;destroyed
    7883                    </object>
    79                    
    80                 </object>   
    81                
     84
     85                </object>
     86
    8287                <object size="0 65 100% 100%-50">
    8388                    <repeat count="8">
     
    95100                    </repeat>
    96101                </object>
    97            
     102
    98103            </object>
    99             <object name="conquestPanel" type="image" sprite="bgInfoBox" size="16 100 100%-16 100%-16" hidden="true">
    100                
     104            <object name="conquestPanel" type="image" sprite="ForegroundBody" size="20 100 100%-20 100%-48" hidden="true">
     105
    101106                <object size="0 0 100% 100%-50">
    102107                    <object name="playerName1Heading" type="text" style="LeftTabLabelText">
     
    112117                        Map&#10;exploration
    113118                    </object>
    114                 </object>   
    115                
     119                </object>
     120
    116121                <object size="0 65 100% 100%-50">
    117122                    <repeat count="8">
     
    126131                    </repeat>
    127132                </object>
    128            
     133
    129134            </object>
    130             <object name="resourcesPanel" type="image" sprite="bgInfoBox" size="16 100 100%-16 100%-16" hidden="true">
    131            
     135            <object name="resourcesPanel" type="image" sprite="ForegroundBody" size="20 100 100%-20 100%-48" hidden="true">
     136
    132137                <object size="0 0 100% 100%-50">
    133138                    <object name="playerName2Heading" type="text" style="LeftTabLabelText">
     
    152157                        Treasures&#10;collected
    153158                    </object>
    154                 </object>   
    155                
     159                </object>
     160
    156161                <object size="0 65 100% 100%-50">
    157162                    <repeat count="8">
     
    169174                    </repeat>
    170175                </object>
    171            
     176
    172177            </object>
    173            
     178
    174179            <object type="button" style="StoneButton" size="100%-176 100%-48 100%-20 100%-20">
    175180                Main Menu
Note: See TracChangeset for help on using the changeset viewer.