Add tab navigation for building and recruitment UI
Nix package / build (push) Successful in 7m59s
Linux package builds (test) / linux (push) Successful in 2m29s
Linux package builds (test) / aur (push) Successful in 7m18s
Rust checks / check (push) Successful in 3m21s

- Add selection indices and option lists to SkirmishState.
- Implement `cycle_popup_option` and expose Left/Right actions in
  keybindings.
- Introduce `cancel_focused_tasks` in BoardState for Delete handling.
- CellWidget now displays recruitment progress on Base structures.
- Update README and documentation to describe new tabs and arrow
  navigation.
- Adjust test counts and add extensive task‑cancellation tests.
This commit is contained in:
GarandPLG committed 2026-10-23 17:53:46 +02:00
1 parent 6c1141a711
commit 110d4c411a
16 files changed
+546 -48

No files matched your search

+19
View File
@@ -500,6 +500,25 @@ impl BoardState {
}
}
pub fn cancel_focused_tasks(&mut self, all: bool) -> bool {
if self.marked_cells.marking_cells {
return false;
}
let (row, col): (usize, usize) = self.focused_cell.get_coords();
let Some(unit) = self.cells[row][col].get_mut_option_unit().as_mut() else {
return false;
};
if unit.get_owner() != Players::Player || unit.get_ref_tasks().is_empty() {
return false;
}
if all {
unit.get_mut_tasks().clear();
} else {
unit.get_mut_tasks().pop_back();
}
true
}
pub fn advance_turn(&mut self) {
// Snapshot positions so moving to a later cell cannot grant another turn.
let active: Vec<(usize, usize)> = self