Refactor settings UI and add typed option handling

- Rename `GameMode::Frontlines` to `FrontLines`.
- Introduce `SettingsValue` enum and `SettingsOption` vector for
  typed settings.
- Implement `Display` for `SettingsValue`, `GameMode`, and
  `PerkDecks`.
- Enhance settings keybindings: navigation with Up/Down, value
  parsing on Enter, and error messages.
- Update settings view to render options list, selection marker,
  and popup with error feedback.
- Restyle main menu selector and keybindings widget title.
- Add required imports and minor layout adjustments.
This commit is contained in:
2026-03-16 21:42:08 +01:00
parent 1d8d1eed46
commit 53a713b5ea
6 changed files with 247 additions and 58 deletions
+2 -2
View File
@@ -66,9 +66,9 @@ pub fn main_menu_view(app: &App, area: Rect, buf: &mut Buffer) {
let view_string: String = format_view_string(format!("{:?}", view));
let styled: Line<'_> = if app.states.main_menu.selected_view == i {
Line::from(format!("> {view_string}")).yellow()
Line::from_iter(["> ".cyan(), view_string.yellow()]).yellow()
} else {
Line::from(view_string).white()
Line::from(format!(" {view_string}")).white()
};
styled