0ad/binaries/data/mods/public/gui/session
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
..
campaigns Fix unresponsiveness after campaign game ends 2026-04-01 13:03:56 +02:00
chat Fix inconsistent chat line spacing 2026-02-21 08:48:17 +01:00
cinema Revamp the cinema GUI code 2026-03-03 11:25:52 +01:00
developer_overlay Adds slider to developer overlay 2026-04-29 19:25:03 +02:00
dialogs Add yes-no dialog and general dialog code to present choices to players. Can be used by triggers. 2014-07-02 14:48:22 +00:00
diplomacy Refactor GUI object resizing JS code passages 2025-06-17 12:57:37 -05:00
hotkeys Fix selecting formations when cycling through idle entities. 2022-04-03 17:37:34 +00:00
lobby Fix eslint rule 'prefer-const' in gui/session/[a-l]* 2025-05-10 16:52:52 +02:00
match_settings Fix MatchSettingsDialog after b34f4b79aa 2025-06-17 23:27:18 -05:00
message_box Remove the hint that ai-rejoin isn't supported 2026-05-10 14:18:52 +02:00
minimap Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
selection_panels_left Allow picking a default formation for walk (and walk-like) orders. 2020-12-31 10:04:58 +00:00
selection_panels_middle Increase text size for capture, health, and resource stats in GUI panels 2025-06-11 08:34:42 -05:00
selection_panels_right More versatile placement of research buttons 2026-07-06 05:01:12 +02:00
session_objects Shrink selection panel icons 2020-09-07 17:36:44 +00:00
top_panel Remove pageLoop 2026-04-26 12:44:39 +02:00
trade Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
Ambient.js TimeNotificationOverlay and Ambient class, refs #5387. 2019-10-30 14:39:44 +00:00
AutoFormation.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
Cheats.js Delete redundant per player CheatsEnable property 2025-08-25 20:41:31 +02:00
DiplomacyColors.js Fix eslint rule 'prefer-const' in gui/session 2025-05-10 18:05:22 +02:00
GameSpeedControl.js Fix eslint rule 'prefer-const' in gui/session 2025-05-10 18:05:22 +02:00
GameSpeedControl.xml Implement session event subscription system and rewrite TopPanel, PlayerViewControl, GameSpeed, Pausing, ObjectivesDialog to use object orientation, refs #5387. 2019-10-17 15:08:56 +00:00
input.js Allow players to set rally points on allied buildings 2026-06-10 00:09:48 +02:00
Menu.js Remove Engine.SwitchGuiPage from session 2026-04-26 12:44:41 +02:00
Menu.xml Make the in-game menu go over the dev overlay. 2021-01-17 15:58:11 +00:00
MenuButtons.js Add hotkeys for opening GUI pages across the game 2026-05-16 20:53:54 +02:00
messages.js Fix UI when connecting to a server fails 2026-05-17 17:20:37 +02:00
NetworkDelayOverlay.js Fix eslint rule 'prefer-const' in gui/session 2025-05-10 18:05:22 +02:00
NetworkDelayOverlay.xml Don't error in the network delay notifier. 2021-04-02 14:20:37 +00:00
NetworkStatusOverlay.js Remove Engine.SwitchGuiPage from session 2026-04-26 12:44:41 +02:00
NetworkStatusOverlay.xml Move session network status overlay to a separate class, refs #5387 and fix pause hotkey disabling for non-hosting observers following e3f43f6352/D2378. 2019-10-30 13:48:27 +00:00
OverlayCounterElapsedTime.js Fix eslint rule 'prefer-const' in gui/session 2025-05-10 18:05:22 +02:00
OverlayCounterRemainingCeasefire.js Fix FPS/realtime/matchtime/ceasefire overlay counter visibility following 38e06fce7e/D2391 when starting with all counters disabled or starting a match with ceasefire disabled but ceasefire counter enabled, reported by Polakrity. 2019-10-29 16:28:36 +00:00
PanelEntities.xml Remove health component from relics. 2020-12-06 07:22:51 +00:00
PanelEntity.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
PanelEntityManager.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
PauseControl.js Fix eslint rule 'prefer-const' in gui/session 2025-05-10 18:05:22 +02:00
PauseOverlay.js Fix eslint rule 'prefer-const' in gui/session 2025-05-10 18:05:22 +02:00
PauseOverlay.xml Revert session z="0" removal in 702cdbf0c7/D2292, since the value of the "default" style value for "z" is overwritten by CGUI::Xeromyces_ReadObject and since these session/ z values are necessary for correct display, refs 31a2dd294e. 2019-10-28 12:50:30 +00:00
placement.js [gui] building → structure 2020-01-11 10:58:43 +00:00
RangeOverlayManager.js Fix eslint rule 'prefer-const' in gui/session 2025-05-10 18:05:22 +02:00
ResearchProgress.js Refactor GUI object resizing JS code passages 2025-06-17 12:57:37 -05:00
ResearchProgress.xml Allow to push items to the front of the ProductionQueue. 2021-10-10 19:07:42 +00:00
selection.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
selection_details.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
selection_panels.js More versatile placement of research buttons 2026-07-06 05:01:12 +02:00
selection_panels_helpers.js Use @stylistic/brace-style for eslint 2026-01-12 21:33:52 +01:00
session.js Allow players to set rally points on allied buildings 2026-06-10 00:09:48 +02:00
session.xml More versatile placement of research buttons 2026-07-06 05:01:12 +02:00
SessionMessageBox.js Remove Engine.SwitchGuiPage from session 2026-04-26 12:44:41 +02:00
setup.xml Add chat notifications for flares 2024-10-19 10:07:30 +02:00
sprites.xml More versatile placement of research buttons 2026-07-06 05:01:12 +02:00
styles.xml Remove empty and invalid sprite assignments 2025-02-26 16:20:27 +01:00
TimeNotificationOverlay.js Fix eslint rule 'prefer-const' in gui/session 2025-05-10 18:05:22 +02:00
TimeNotificationOverlay.xml TimeNotificationOverlay and Ambient class, refs #5387. 2019-10-30 14:39:44 +00:00
TopPanel.js Rename the 'Objectives' dialog to 'Match Settings' 2025-06-15 19:24:03 +02:00
TopPanel.xml Implement session event subscription system and rewrite TopPanel, PlayerViewControl, GameSpeed, Pausing, ObjectivesDialog to use object orientation, refs #5387. 2019-10-17 15:08:56 +00:00
tutorial_panel.xml Adjust size of tutorial window by increasing its width and decrease height, to make it a bit less intrusive. 2017-05-27 14:09:29 +00:00
unit_actions.js Allow players to set rally points on allied buildings 2026-06-10 00:09:48 +02:00
unit_commands.js More versatile placement of research buttons 2026-07-06 05:01:12 +02:00