From 9f442fa339371869dda44a32a9e0ec2f763d830c Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 2 Dec 2026 19:05:52 +0400 Subject: feat(ui): connect the bunker list to the strategic camera Show clan bunkers with the original compound controls and map selection. The strategic command button switches the camera anchor and preserves a view already bound to that bunker. Check the stock Two Fortresses window with Vulkan validation and exercise retargeting and the ownership guard with the licensed runtime test. --- apps/fparkan-game/src/strategic_toolbar_hud.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'apps/fparkan-game/src/strategic_toolbar_hud.rs') diff --git a/apps/fparkan-game/src/strategic_toolbar_hud.rs b/apps/fparkan-game/src/strategic_toolbar_hud.rs index 2ad93a59..74f313ac 100644 --- a/apps/fparkan-game/src/strategic_toolbar_hud.rs +++ b/apps/fparkan-game/src/strategic_toolbar_hud.rs @@ -5,6 +5,7 @@ use super::{ use fparkan_assets::strategy_toolbar::{ ButtonVisual, ToolbarHover, ToolbarImages, ToolbarLayout, CONTROL_COUNT, EXTENT, }; +use fparkan_runtime::strategic_buildings::BuildingSection; use std::path::Path; pub(super) struct StrategicToolbarHud { @@ -69,8 +70,14 @@ impl StrategicToolbarHud { if frame.factories_open && frame.sections[4] { visuals[5] = ButtonVisual::Lit; } - if frame.other_buildings_open && frame.sections[7] { - visuals[8] = ButtonVisual::Lit; + if let Some(section) = frame.building_section { + let index = match section { + BuildingSection::Bunkers => 7, + BuildingSection::Other => 8, + }; + if frame.sections[index - 1] { + visuals[index] = ButtonVisual::Lit; + } } // The chat button is disabled in a local mission. visuals[9] = ButtonVisual::Disabled; @@ -101,7 +108,7 @@ pub(super) struct ToolbarFrame { pub sections: [bool; 8], pub warbots_open: bool, pub factories_open: bool, - pub other_buildings_open: bool, + pub building_section: Option, pub map_open: bool, pub pointer: Option<[f32; 2]>, pub now_ms: u32, -- cgit v1.2.3