0ad/binaries/data/mods/public/gui/session/sprites.xml
Vantha fb38c8781b
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
More versatile placement of research buttons
This patch allows techs to optionally define a property "placeBelow"
specifying a combination of class requirements. The selection panel then
tries to place their research button below the training button whose
unit matches these classes -- if there is only and exactly one.
This is useful for techs only affecting a single type of unit: it e.g.
allows always placing the fishing nets research button below the fishing
boats training button.
To prevent duplicating information in "placeBelow" (e.g. from
"affects"), it can also be set to two magic values: "{AffectedUnit}" and
"{UnlockedUnit}". In practice, many techs use those, but class
combination remain useful for granular control in very specific cases.

Regarding tech pairs, as explained in a comment, their two research
buttons can now be placed in three different arrangements (with
descending preference):
1. Vertically below a single training button.
2. Horizontally below two adjacent training buttons.
3. Horizontally adjacent in the bottom row (below no training buttons).

Vertically in the third and fourth rows (below no training button) --
how it was previously -- is no longer done as it'd conflict with and
doesn't fit the new layout and the clear separation between "generic"
and "specific" techs.

Whenever a research button can't be placed in their preferred location
because it is already occupied, the code simply falls back to the default
position in the bottom row.

This patch also adds a new game option to hide the new small arrows above
the research buttons in order to give more experienced players who already
know the techs well the possibility to reduce visual clutter. By
default, the arrows are shown.
2026-07-06 05:01:12 +02:00

575 lines
15 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<sprites>
<sprite name="groupsIcon">
<image
texture="session/icons/groups.png"
size="0 0 100% 100%"
/>
</sprite>
<!-- ================================ ================================ -->
<!-- Menu -->
<!-- ================================ ================================ -->
<sprite name="horizontalThinBorder">
<image
texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
/>
</sprite>
<!-- ================================ ================================ -->
<!-- Panel Backgrounds -->
<!-- ================================ ================================ -->
<!-- Generic Panel -->
<sprite name="genericPanel">
<image
texture="global/modern/background.png"
texture_size="0 0 100% 100%"
size="0 0 100% 100%"
/>
<!-- sides -->
<image
texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 0 100%-4 4"
/>
<image
texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="100%-4 4 100% 100%-4"
/>
<image
texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 100%-4 100%-4 100%"
/>
<image
texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="0 4 4 100%-4"
/>
<!-- corners -->
<image
texture="global/border/line_corner_top_right.png"
texture_size="0 0 4 4"
size="100%-4 0 100% 4"
/>
<image
texture="global/border/line_corner_bottom_right.png"
texture_size="0 0 4 4"
size="100%-4 100%-4 100% 100%"
/>
<image
texture="global/border/line_corner_bottom_left.png"
texture_size="0 0 4 4"
size="0 100%-4 4 100%"
/>
<image
texture="global/border/line_corner_top_left.png"
texture_size="0 0 4 4"
size="0 0 4 4"
/>
</sprite>
<!-- Top Panel -->
<sprite name="topPanel">
<image
texture="session/ribbon_bg.png"
real_texture_placement="0 0 2048 32"
size="0 0 100% 100%"
/>
<!-- sides -->
<image
texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 0 100%-4 4"
/>
<image
texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 100%-4 100%-4 100%"
/>
</sprite>
<sprite name="CivIconOver">
<image
texture="session/portraits/emblems/states/hover.png"
size="0 0 100% 100%"
/>
</sprite>
<!-- Map Panel -->
<sprite name="mapPanel">
<image backcolor="0 0 0"
size="0 0 100% 100%"
/>
<!-- sides -->
<image
texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 0 100%-4 4"
/>
<image
texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="100%-4 4 100% 100%-4"
/>
<image
texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 100%-4 100%-4 100%"
/>
<image
texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="0 4 4 100%-4"
/>
<!-- corners -->
<image
texture="global/border/line_corner_top_right.png"
texture_size="0 0 4 4"
size="100%-4 0 100% 4"
/>
<image
texture="global/border/line_corner_bottom_right.png"
texture_size="0 0 4 4"
size="100%-4 100%-4 100% 100%"
/>
<image
texture="global/border/line_corner_bottom_left.png"
texture_size="0 0 4 4"
size="0 100%-4 4 100%"
/>
<image
texture="global/border/line_corner_top_left.png"
texture_size="0 0 4 4"
size="0 0 4 4"
/>
</sprite>
<!-- Bottom Left Panel -->
<sprite name="supplementalDetailsPanel">
<!-- sides -->
<image texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 0 100%-4 4"
/>
<image texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="100%-4 4 100% 100%-4"
/>
<image texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 100%-4 100%-4 100%"
/>
<image texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="0 4 4 100%-4"
/>
<!-- corners -->
<image texture="global/border/line_corner_middle_left.png"
texture_size="0 0 4 4"
size="100%-4 0 100% 4"
/>
<image texture="global/border/line_corner_bottom_middle.png"
texture_size="0 0 4 4"
size="100%-4 100%-4 100% 100%"
/>
<image texture="global/border/line_corner_bottom_middle.png"
texture_size="0 0 4 4"
size="0 100%-4 4 100%"
/>
<image texture="global/border/line_corner_middle_right.png"
texture_size="0 0 4 4"
size="0 0 4 4"
/>
<!-- background -->
<image texture="session/hud_panels.png"
real_texture_placement="314 98 512 256"
texture_size="0 0 100% 100%"
size="4 4 100%-4 100%-4"
/>
</sprite>
<!-- Bottom Middle Panel -->
<sprite name="selectionDetailsPanel">
<!-- background -->
<image texture="session/hud_panels.png"
real_texture_placement="0 0 220 192"
texture_size="0 0 100% 100%"
size="0 0 100% 100%"
/>
<!-- sides -->
<image texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 0 100%-4 4"
/>
<image texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="100%-4 4 100% 100%-4"
/>
<image texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 100%-4 100%-4 100%"
/>
<image texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="0 4 4 100%-4"
/>
<!-- corners -->
<image texture="global/border/line_corner_top_right.png"
texture_size="0 0 4 4"
size="100%-4 0 100% 4"
/>
<image texture="global/border/line_corner_bottom_right.png"
texture_size="0 0 4 4"
size="100%-4 100%-4 100% 100%"
/>
<image texture="global/border/line_corner_bottom_left.png"
texture_size="0 0 4 4"
size="0 100%-4 4 100%"
/>
<image texture="global/border/line_corner_top_left.png"
texture_size="0 0 4 4"
size="0 0 4 4"
/>
</sprite>
<!-- Bottom Right Panel -->
<sprite name="unitCommandsPanel">
<!-- sides -->
<image texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 0 100%-4 4"
/>
<image texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="100%-4 4 100% 100%-4"
/>
<image texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 100%-4 100%-4 100%"
/>
<image texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="0 4 4 100%-4"
/>
<!-- corners -->
<image texture="global/border/line_corner_top_right.png"
texture_size="0 0 4 4"
size="100%-4 0 100% 4"
/>
<image texture="global/border/line_corner_bottom_right.png"
texture_size="0 0 4 4"
size="100%-4 100%-4 100% 100%"
/>
<image texture="global/border/line_corner_bottom_middle.png"
texture_size="0 0 4 4"
size="0 100%-4 4 100%"
/>
<image texture="global/border/line_corner_middle_right.png"
texture_size="0 0 4 4"
size="0 0 4 4"
/>
<!-- background -->
<image texture="session/hud_panels.png"
real_texture_placement="75 64 469 222"
texture_size="0 0 100% 100%"
size="4 4 100%-4 100%-4"
/>
</sprite>
<!-- ================================ ================================ -->
<!-- Shading -->
<!-- ================================ ================================ -->
<sprite name="panelShader">
<image texture="session/panel_shader.png"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="edgedPanelShader">
<image texture="session/panel_shader_top_edge.png"
real_texture_placement="0 0 256 1"
size="0 0 100% 1"
/>
<image texture="session/panel_shader.png"
size="0 0 100% 100%-5"
/>
<image texture="session/panel_shader_bottom_edge.png"
real_texture_placement="0 0 256 5"
size="0 100%-5 100% 100%"
/>
</sprite>
<sprite name="bottomEdgedPanelShader">
<image texture="session/panel_shader_top_edge.png"
real_texture_placement="0 0 256 1"
size="0 0 100% 1"
/>
<image texture="session/panel_shader.png"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="topEdgedPanelShader">
<image texture="session/panel_shader.png"
size="0 0 100% 100%-5"
/>
<image texture="session/panel_shader_bottom_edge.png"
real_texture_placement="0 0 256 5"
size="0 100%-5 100% 100%"
/>
</sprite>
<sprite name="queuePanelShader">
<image texture="session/panel_shader.png"
size="4 4 100%-4 100%-4"
/>
<!-- sides -->
<image
texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 0 100%-4 4"
/>
<image
texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="100%-4 4 100% 100%-4"
/>
<image
texture="global/border/line_horiz.png"
texture_size="0 0 64 4"
size="4 100%-4 100%-4 100%"
/>
<image
texture="global/border/line_vert.png"
texture_size="0 0 4 64"
size="0 4 4 100%-4"
/>
<!-- corners -->
<image
texture="global/border/line_corner_top_right.png"
texture_size="0 0 4 4"
size="100%-4 0 100% 4"
/>
<image
texture="global/border/line_corner_bottom_right.png"
texture_size="0 0 4 4"
size="100%-4 100%-4 100% 100%"
/>
<image
texture="global/border/line_corner_bottom_left.png"
texture_size="0 0 4 4"
size="0 100%-4 4 100%"
/>
<image
texture="global/border/line_corner_top_left.png"
texture_size="0 0 4 4"
size="0 0 4 4"
/>
</sprite>
<sprite name="glassSquareMap">
<image backcolor="255 255 255 56" size="0 0 100% 1"/>
<image backcolor="255 255 255 56" size="100%-1 1 100% 100%"/>
<image backcolor="255 255 255 56" size="0 100%-1 100% 100%"/>
<image backcolor="255 255 255 56" size="0 1 1 100%-1"/>
<image backcolor="255 255 255 44" size="1 1 100%-1 2"/>
<image backcolor="255 255 255 44" size="100%-2 2 100%-1 100%-1"/>
<image backcolor="255 255 255 44" size="1 100%-2 100%-1 100%-1"/>
<image backcolor="255 255 255 44" size="1 2 2 100%-2"/>
<image backcolor="255 255 255 32" size="2 2 100%-2 3"/>
<image backcolor="255 255 255 32" size="100%-3 3 100%-2 100%-2"/>
<image backcolor="255 255 255 32" size="2 100%-3 100%-2 100%-2"/>
<image backcolor="255 255 255 32" size="2 3 3 100%-3"/>
</sprite>
<sprite name="iconBorder">
<image backcolor="gold" size="0 0 100% 1"/>
<image backcolor="gold" size="100%-1 1 100% 100%"/>
<image backcolor="gold" size="0 100%-1 100% 100%"/>
<image backcolor="gold" size="0 1 1 100%-1"/>
</sprite>
<sprite name="statsBarShaderHorizontal">
<image texture="session/bar_lighting_horizontal.png"
real_texture_placement="0 0 150 7"
size="0 0 100% 100%"
/>
</sprite>
<sprite name="statsBarShaderVertical">
<image texture="session/bar_lighting_vertical.png"
real_texture_placement="0 0 7 150"
size="0 0 100% 100%"
/>
</sprite>
<!-- ================================ ================================ -->
<!-- Colored Stats Bars -->
<!-- ================================ ================================ -->
<sprite name="playerColorBackground">
<image backcolor="255 255 255 128"/>
</sprite>
<sprite name="barBorder">
<image backcolor="0 0 0 128"/>
</sprite>
<sprite name="queueProgressSlider">
<image backcolor="0 255 0 128"/>
</sprite>
<sprite name="healthBackground">
<image backcolor="red"/>
</sprite>
<sprite name="healthForeground">
<image backcolor="green"/>
</sprite>
<sprite name="resourceBackground">
<image backcolor="darkgray"/>
</sprite>
<sprite name="resourceForeground">
<image backcolor="orange"/>
</sprite>
<sprite name="experienceBackground">
<image backcolor="darkgray"/>
</sprite>
<sprite name="experienceForeground">
<image backcolor="white"/>
</sprite>
<!-- ================================ ================================ -->
<!-- Chat -->
<!-- ================================ ================================ -->
<sprite name="chatInput">
<image backcolor="255 255 255 192" size="0 0 100% 1"/>
<image backcolor="255 255 255 192" size="100%-1 1 100% 100%-1"/>
<image backcolor="255 255 255 192" size="0 100%-1 100% 100%"/>
<image backcolor="255 255 255 192" size="0 1 1 100%-1"/>
<image backcolor="255 255 255 128" size="0 1 100% 2"/>
<image backcolor="255 255 255 128" size="100%-2 2 100%-1 100%-2"/>
<image backcolor="255 255 255 128" size="0 100%-2 100% 100%-1"/>
<image backcolor="255 255 255 128" size="1 2 2 100%-2"/>
<image backcolor="255 255 255 64" size="0 2 100% 3"/>
<image backcolor="255 255 255 64" size="100%-3 3 100%-2 100%-3"/>
<image backcolor="255 255 255 64" size="0 100%-3 100% 100%-2"/>
<image backcolor="255 255 255 64" size="2 3 3 100%-3"/>
<image backcolor="0 0 0 144" size="3 3 100%-3 100%-3"/>
</sprite>
<sprite name="chatInputHighlight">
<image backcolor="255 165 0 192" size="-2 1 100% 100%+1"/>
</sprite>
<!-- ================================ ================================ -->
<!-- Tooltips -->
<!-- ================================ ================================ -->
<sprite name="BackgroundSessionTooltip">
<image
backcolor="darkbrown"
size="0 0 100% 100%"
/>
<image backcolor="gold" size="0 0 100% 1"/>
<image backcolor="gold" size="0 100%-1 100% 100%"/>
<image backcolor="gold" size="0 0 1 100%"/>
<image backcolor="gold" size="100%-1 0 100% 100%"/>
</sprite>
<sprite name="BackgroundInformationTooltip">
<image
backcolor="0 0 0 192"
size="0 0 100% 100%"
/>
<image backcolor="white" size="0 0 100% 1"/>
<image backcolor="white" size="0 100%-1 100% 100%"/>
<image backcolor="white" size="0 0 1 100%"/>
<image backcolor="white" size="100%-1 0 100% 100%"/>
</sprite>
<sprite name="BackgroundErrorTooltip">
<image
backcolor="0 0 0 192"
size="0 0 100% 100%"
/>
<image backcolor="red" size="0 0 100% 1"/>
<image backcolor="red" size="0 100%-1 100% 100%"/>
<image backcolor="red" size="0 0 1 100%"/>
<image backcolor="red" size="100%-1 0 100% 100%"/>
</sprite>
<!-- ================================ ================================ -->
<!-- Misc -->
<!-- ================================ ================================ -->
<sprite name="bandbox">
<image backcolor="black" size="0 0 100% 1"/>
<image backcolor="black" size="100%-1 0 100% 100%"/>
<image backcolor="black" size="0 100%-1 100% 100%"/>
<image backcolor="black" size="0 0 1 100%"/>
<image backcolor="white" size="1 1 100%-1 2"/>
<image backcolor="white" size="100%-2 1 100%-1 100%-1"/>
<image backcolor="white" size="1 100%-2 100%-1 100%-1"/>
<image backcolor="white" size="1 1 2 100%-1"/>
</sprite>
<sprite name="sessionOverlayBackground">
<image backcolor="0 0 0 185"/>
</sprite>
<sprite name="ResearchPanelSeparator">
<image backcolor="57 55 30"/>
<image backcolor="89 77 23" size="0 1 100% 2"/>
</sprite>
<!-- ================================ ================================ -->
<!-- Unit portrait -->
<!-- ================================ ================================ -->
<sprite name="snIconPortrait">
<image texture="session/icons/bkg/portrait_black.dds" size="0 0 100% 100%"/>
</sprite>
<sprite name="snIconPortraitOver">
<effect add_color="42 42 42 0"/>
<image texture="session/icons/bkg/portrait_black.dds" size="0 0 100% 100%"/>
</sprite>
<sprite name="snIconPortraitDisabled">
<effect grayscale=""/>
<image texture="session/icons/bkg/portrait_black.dds" size="0 0 100% 100%"/>
</sprite>
</sprites>