Add zoom support and dynamic keybinding layout

Introduce ZoomIn/ZoomOut actions and a Zoom group with corresponding
keybindings.
Add a CLI option to set the initial zoom level and a ZoomLevel enum.
Expose a utility to compute the largest keybinding group size for layout
sizing.
Refactor board widget to adjust cell dimensions based on zoom level and
simplify offset calculations.
Update views to use the new layout sizing helper and integrate zoom
handling in skirmish logic.
This commit is contained in:
GarandPLG committed 2026-03-29 14:12:03 +02:00
1 parent edf491457e
commit 1d1dc0f2f7
11 files changed
+145 -49

No files matched your search

+10 -1
View File
@@ -1,5 +1,5 @@
use crate::app::{
states::{GameMode, PerkDecks},
states::{GameMode, PerkDecks, ZoomLevel},
view::View,
};
use clap::{Error, Parser, error::ErrorKind, value_parser};
@@ -52,6 +52,15 @@ pub struct Cli {
)]
pub map_height: u8,
#[arg(
long,
help = "Zoom level",
value_name = "...",
default_value_t = ZoomLevel::Default,
value_enum
)]
pub zoom_level: ZoomLevel,
#[arg(
long,
help = "Perk Deck",