generated from GarandPLG/rust-flake-template
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:
1 parent
1d8d1eed46
commit
53a713b5ea
6 files changed
+247
-58
No files matched your search
@@ -72,7 +72,11 @@ impl Widget for KeybindingsWidget {
|
||||
|
||||
let block: Block<'_> = Block::default()
|
||||
.borders(Borders::ALL)
|
||||
.title("[ Keybindings ]");
|
||||
.title(Line::from_iter([
|
||||
"[ ".gray(),
|
||||
"Keybindings".magenta(),
|
||||
" ]".gray(),
|
||||
]));
|
||||
|
||||
let inner: Rect = block.inner(area);
|
||||
|
||||
|
||||
Reference in new issue
Block a user