generated from GarandPLG/rust-flake-template
Replace settings module with skirmish mode
Removed the settings UI and its keybinding logic, added a skirmish view and corresponding keybindings, simplified the SettingsState to hold skirmish configuration, updated module exports, and changed the CLI default map height from 25 to 21. Also fixed the main menu selection limit.
This commit is contained in:
1 parent
aaa2c90426
commit
0577697059
14 files changed
+149
-355
No files matched your search
+2
-3
@@ -1,6 +1,6 @@
|
||||
use crate::app::{
|
||||
App,
|
||||
views::{default_view, main_menu_view, settings_view},
|
||||
views::{default_view, main_menu_view, skirmish_view},
|
||||
};
|
||||
use clap::ValueEnum;
|
||||
use ratatui::{buffer::Buffer, layout::Rect, widgets::Widget};
|
||||
@@ -11,7 +11,6 @@ pub enum View {
|
||||
Skirmish,
|
||||
PerkDecks,
|
||||
SkillsConfig,
|
||||
Settings,
|
||||
}
|
||||
|
||||
impl Widget for &App {
|
||||
@@ -21,7 +20,7 @@ impl Widget for &App {
|
||||
{
|
||||
match self.view {
|
||||
View::MainMenu => main_menu_view(self, area, buf),
|
||||
View::Settings => settings_view(self, area, buf),
|
||||
View::Skirmish => skirmish_view(self, area, buf),
|
||||
_ => default_view(area, buf),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user