generated from GarandPLG/rust-flake-template
Refactor to View enum and add keybindings
Replace the `default_window` string field with a `View` enum throughout the application. Introduce a new keybinding module providing `Action`, `KeyBinding` structs and helper functions, and integrate a keybindings widget into the main menu. Update the CLI to accept a `View` value enum and adjust imports and event handling accordingly. Add a release profile in `Cargo.toml` with LTO, single codegen unit, higher optimisation level and binary stripping for smaller, faster builds.
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ fn main() -> Result<()> {
|
||||
let mut terminal: Terminal<CrosstermBackend<Stdout>> = ratatui::init();
|
||||
let mut app: App = App {
|
||||
exit: false,
|
||||
default_window: args.default_window,
|
||||
window: args.window,
|
||||
username: args.username,
|
||||
game_mode: args.game_mode,
|
||||
map_width: args.map_width,
|
||||
|
||||
Reference in New Issue
Block a user