mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07:00
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
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.
129 lines
4.7 KiB
XML
129 lines
4.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<objects>
|
|
|
|
<script directory="gui/common/"/>
|
|
<script directory="gui/common/campaigns/"/>
|
|
<script directory="gui/maps/"/>
|
|
<script directory="gui/session/"/>
|
|
<script directory="gui/session/campaigns/"/>
|
|
<script directory="gui/session/chat/"/>
|
|
<script directory="gui/session/cinema/"/>
|
|
<script directory="gui/session/developer_overlay/"/>
|
|
<script directory="gui/session/diplomacy/"/>
|
|
<script directory="gui/session/diplomacy/playercontrols/"/>
|
|
<script directory="gui/session/lobby/"/>
|
|
<script directory="gui/session/lobby/LobbyRatingReport/"/>
|
|
<script directory="gui/session/match_settings/"/>
|
|
<script directory="gui/session/message_box/"/>
|
|
<script directory="gui/session/minimap/"/>
|
|
<script directory="gui/session/top_panel/"/>
|
|
<script directory="gui/session/top_panel/IconButtons/"/>
|
|
<script directory="gui/session/trade/"/>
|
|
|
|
<object name="session">
|
|
|
|
<action on="Tick">
|
|
onTick();
|
|
</action>
|
|
|
|
<action on="SavegameLoaded">
|
|
restoreSavedGameData(arguments[0]);
|
|
</action>
|
|
|
|
<object name="primaryOverlays">
|
|
<!-- Chat messages -->
|
|
<object name="chatPanel" size="3 131 100% 100%-240" z="0" absolute="true">
|
|
<object name="chatLines">
|
|
<repeat count="20">
|
|
<object name="chatLine[n]" type="button" style="chatPanelOverlay" tooltip_style="sessionToolTipBottomBold" ghost="true" hidden="true"/>
|
|
</repeat>
|
|
</object>
|
|
</object>
|
|
|
|
<include directory="gui/session/chat/"/>
|
|
<include directory="gui/session/developer_overlay/"/>
|
|
<include directory="gui/session/dialogs/"/>
|
|
<include directory="gui/session/diplomacy/"/>
|
|
<include directory="gui/session/match_settings/"/>
|
|
<include file="gui/session/GameSpeedControl.xml"/>
|
|
<include file="gui/session/PanelEntities.xml"/>
|
|
<include file="gui/session/ResearchProgress.xml"/>
|
|
<include file="gui/session/TimeNotificationOverlay.xml"/>
|
|
<include file="gui/session/TopPanel.xml"/>
|
|
<include file="gui/session/trade/TradeDialog.xml"/>
|
|
<include file="gui/session/tutorial_panel.xml"/>
|
|
<include file="gui/session/Menu.xml"/>
|
|
|
|
<!-- Contains miscellanious objects s.a.: the technology research -->
|
|
<!-- progress, group selection icons, and the hero selection icon -->
|
|
<include directory="gui/session/session_objects/"/>
|
|
|
|
<!-- Information tooltip -->
|
|
<!-- Follows the mouse around if 'independent' is set to 'true'. -->
|
|
<object name="informationTooltip" type="tooltip" independent="true" style="informationTooltip"/>
|
|
|
|
<!-- Structure placement info tooltip -->
|
|
<object name="placementTooltip" type="tooltip" independent="true" style="informationTooltip"/>
|
|
|
|
<!-- START of BOTTOM PANEL -->
|
|
<!-- Limit to the minimal supported width of 1024 pixels. -->
|
|
<object size="50%-512 0 50%+512 100%">
|
|
|
|
<object size="50%-512 100%-204 50%-312 100%">
|
|
<include file="gui/session/minimap/MiniMap.xml"/>
|
|
</object>
|
|
|
|
<!-- Supplemental Details Panel (left). -->
|
|
<object name="supplementalSelectionDetails"
|
|
size="50%-316 100%-166 50%-110 100%"
|
|
sprite="supplementalDetailsPanel"
|
|
type="image"
|
|
z="20"
|
|
>
|
|
<include directory="gui/session/selection_panels_left/"/>
|
|
</object>
|
|
|
|
<!-- Selection Details Panel (middle). -->
|
|
<object name="selectionDetails"
|
|
size="50%-114 100%-204 50%+114 100%"
|
|
sprite="selectionDetailsPanel"
|
|
type="image"
|
|
>
|
|
<include directory="gui/session/selection_panels_middle/"/>
|
|
</object>
|
|
|
|
<!-- Commands Panel (right). -->
|
|
<object name="unitCommands"
|
|
size="50%+110 100%-173 50%+512 100%"
|
|
sprite="unitCommandsPanel"
|
|
type="image"
|
|
z="20"
|
|
>
|
|
<include directory="gui/session/selection_panels_right/"/>
|
|
</object>
|
|
</object><!-- END OF BOTTOM PANEL -->
|
|
</object><!-- END OF PRIMARY OVERLAYS -->
|
|
|
|
<!-- Hotkeys of button objects can only be triggered while the object is neither set hidden nor disabled. -->
|
|
<!-- That is why they are placed outside of menus and overlays. -->
|
|
<!-- And this object can therefore be used to turn on and off all these hotkeys here at once. -->
|
|
<object name="hotkeys">
|
|
<include directory="gui/session/hotkeys/"/>
|
|
</object>
|
|
|
|
<!-- Selection bandbox. -->
|
|
<!-- Placed outside the primary overlays, so it can be shown even when all overlays are hidden (e.g. with the hotkey)-->
|
|
<object name="bandbox" type="image" sprite="bandbox" ghost="true" hidden="true" z="200"/>
|
|
|
|
<!-- Overlaps with the primary overlays, they're never shown both at once. -->
|
|
<include file="gui/session/cinema/CinemaOverlay.xml"/>
|
|
|
|
<!-- Objects that make sense to sometimes still show while the primary overlays are hidden. -->
|
|
<object name="supplementaryOverlays">
|
|
<include file="gui/session/NetworkStatusOverlay.xml"/>
|
|
<include file="gui/session/NetworkDelayOverlay.xml"/>
|
|
<include file="gui/session/PauseOverlay.xml"/>
|
|
</object>
|
|
</object> <!-- END OF SESSION OBJECT -->
|
|
</objects>
|