Changeset 27260

Timestamp:
Nov 28, 2022, 4:17:37 AM (20 months ago)
Author:
trompetin17
Message:

Display a tooltip for the health and capture points and fix the civ tooltip style.

Comments By: asterix, Stan

Fixes #6367
Differential Revision: ​https://code.wildfiregames.com/DD4323

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

Legend:

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

    r26300 r27260  
    187187        let showSmallCapture = showResource && showHealth;
    188188        Engine.GetGUIObjectByName("captureStats").caption = showSmallCapture ? "" : captureText;
    189         Engine.GetGUIObjectByName("capture").tooltip = showSmallCapture ? captureText : "";
     189        Engine.GetGUIObjectByName("capture;
    190190    }
    191191
     
    320320    let isGaia = playerState.civ == "gaia";
    321321    Engine.GetGUIObjectByName("playerCivIcon").sprite = isGaia ? "" : "cropped:1.0, 0.15625 center:grayscale:" + civEmblem;
    322     Engine.GetGUIObjectByName("player").tooltip = isGaia ? "" : civName;
     322    Engine.GetGUIObjectByName("").tooltip = isGaia ? "" : civName;
    323323
    324324    // TODO: we should require all entities to have icons
  • ps/trunk/binaries/data/mods/public/gui/session/selection_panels_middle/single_details_area.xml

    r25964 r27260  
    1616            <!-- Player name. -->
    1717            <object size="0 50%-10 100% 50%+10" name="player" type="text" style="largeCenteredOutlinedText"/>
     18
    1819        </object>
    1920
     
    3536            <object size="96 32 100% 55" name="sectionPosBottom" hidden="true"/>
    3637
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
    3754            <!-- Health bar -->
    3855            <object name="healthSection">
    39                 <object size="0 0 100% 12" name="healthLabel" type="text" style="StatsTextLeft" ghost="true">
    40                     <translatableAttribute id="tooltip">Health</translatableAttribute>
    41                 </object>
    4256                <object size="0 0 100% 12" name="healthStats" type="text" style="StatsTextRight" ghost="true"/>
    4357                <object size="1 14 100% 21" name="health" type="image" tooltip_style="sessionToolTip">
     
    4761                    <object type="image" sprite="statsBarShaderHorizontal" ghost="true"/>
    4862                </object>
    49             </object>
    50 
    51             <!-- Capture bar -->
    52             <object name="captureSection">
    53                 <object size="0 0 100% 12" name="captureLabel" type="text" style="StatsTextLeft" ghost="true">
    54                     <translatableAttribute id="tooltip">Capture points</translatableAttribute>
    55                 </object>
    56                 <object size="0 0 100% 12" name="captureStats" type="text" style="StatsTextRight" ghost="true"/>
    57                 <object size="1 14 100% 21" name="capture" type="image" tooltip_style="sessionToolTip">
    58                     <object type="image" sprite="barBorder" ghost="true" size="-1 -1 100%+1 100%+1"/>
    59                     <repeat count="9">
    60                         <object type="image" sprite="playerColorBackground" ghost="true" name="captureBar[n]" hidden="true"/>
    61                     </repeat>
    62                     <object type="image" sprite="statsBarShaderHorizontal" ghost="true"/>
     63                <object type="image" tooltip_style="sessionToolTip">
     64                    <translatableAttribute id="tooltip">Health</translatableAttribute>
    6365                </object>
    6466            </object>
Note: See TracChangeset for help on using the changeset viewer.