Ticket #4187: WinLosePatch.diff

File WinLosePatch.diff, 4.8 KB (added by javiergodas, 2 years ago)

Update (thx elexis for the review)

  • binaries/data/mods/public/gui/credits/texts/programming.json

     
    9696            {"nick": "Itms", "name": "Nicolas Auvray"},
    9797            {"nick": "Jaison", "name": "Marco tom Suden"},
    9898            {"nick": "jammus", "name": "James Scott"},
     99                        {"nick": "javiergodas", "name": "Javier Godas Vieitez"},
    99100            {"nick": "Jgwman"},
    100101            {"nick": "JonBaer", "name": "Jon Baer"},
    101102            {"nick": "Josh", "name": "Joshua J. Bakita"},
  • binaries/data/mods/public/gui/summary/summary.js

     
    9191
    9292        let positionObject = playerBoxesCounts[playerState.team+1] - 1;
    9393        let rowPlayer = "playerBox[" + positionObject + "]";
     94                let playerOutcome = "playerOutcome[" + positionObject + "]";
    9495        let playerNameColumn = "playerName[" + positionObject + "]";
    95         let playerColorBoxColumn = "playerColorBox[" + positionObject + "]";
    9696        let playerCivicBoxColumn = "civIcon[" + positionObject + "]";
    9797        let playerCounterValue = "valueData[" + positionObject + "]";
    9898
     
    9999        if (playerState.team != -1)
    100100        {
    101101            rowPlayer = "playerBoxt[" + playerState.team + "][" + positionObject + "]";
     102                        playerOutcome = "playerOutcomet[" + playerState.team + "][" + positionObject + "]";
    102103            playerNameColumn = "playerNamet[" + playerState.team + "][" + positionObject + "]";
    103             playerColorBoxColumn = "playerColorBoxt[" + playerState.team + "][" + positionObject + "]";
    104104            playerCivicBoxColumn = "civIcont[" + playerState.team + "][" + positionObject + "]";
    105105            playerCounterValue = "valueDataTeam[" + playerState.team + "][" + positionObject + "]";
    106106        }
     
    118118        boxSize.right = rowPlayerObjectWidth;
    119119        rowPlayerObject.size = boxSize;
    120120
    121         let playerColorBox = Engine.GetGUIObjectByName(playerColorBoxColumn);
    122         playerColorBox.sprite = colorString + g_PlayerColorBoxAlpha;
    123 
    124121        Engine.GetGUIObjectByName(playerNameColumn).caption = g_GameData.sim.playerStates[i+1].name;
    125122
    126123        let civIcon = Engine.GetGUIObjectByName(playerCivicBoxColumn);
     
    127124        civIcon.sprite = "stretched:" + g_CivData[playerState.civ].Emblem;
    128125        civIcon.tooltip = g_CivData[playerState.civ].Name;
    129126
     127                let outcome = Engine.GetGUIObjectByName(playerOutcome);
     128                if(playerState.state == "won")
     129                {
     130                    outcome.sprite = "stretched:session/icons/stances/aggressive.png";
     131                    outcome.tooltip = translate("Victory");
     132                }
     133                else if(playerState.state == "defeated")
     134                {
     135                    outcome.sprite = "stretched:session/icons/kill.png";
     136                    outcome.tooltip = translate("Defeated");
     137                }
     138
    130139        updateCountersPlayer(playerState, panelInfo.counters, playerCounterValue);
    131140
    132141        calculateTeamCounters(playerState);
  • binaries/data/mods/public/gui/summary/summary.xml

     
    119119                    <object size="0 30 100% 100%">
    120120                        <repeat count="8" var="n">
    121121                            <object type="image" name="playerBoxt[i][n]" size="10 0 10 30" hidden="true">
    122                                 <object type="image" sprite="ForegroundBox" size="10 9 34 33">
    123                                     <object name="playerColorBoxt[i][n]" type="image" size="2 2 22 22"/>
    124                                 </object>
     122                                                                <object name="playerOutcomet[i][n]" type="image" size="2 8 30 35"/>
    125123                                <object name="playerNamet[i][n]" type="text" size="40 2 208 100%" style="ModernLeftLabelText"/>
    126124                                <object name="civIcont[i][n]" type="image" size="208 5 240 37" />
    127125                                <repeat var="x" count="8">
     
    142140            <object type="image" name="noTeamsBox" size="0 65 100% 100%-50" hidden="true">
    143141                <repeat count="8">
    144142                    <object type="image" name="playerBox[n]" size="10 0 10 30" hidden="true">
    145                         <object type="image" sprite="ForegroundBox" size="10 9 34 33">
    146                             <object name="playerColorBox[n]" type="image" size="2 2 22 22"/>
    147                         </object>
     143                                                <object name="playerOutcome[n]" type="image" size="2 8 30 35"/>
    148144                        <object name="playerName[n]" type="text" size="40 2 208 100%" style="ModernLeftLabelText"/>
    149145                        <object name="civIcon[n]" type="image" size="208 5 240 37"/>
    150146                        <repeat var="x" count="8">