we compiled centralized system for select

This commit is contained in:
filipriec
2025-04-10 12:13:04 +02:00
parent a8eef8107b
commit 8c7a0a1ec0
7 changed files with 79 additions and 21 deletions

View File

@@ -3,6 +3,8 @@
pub mod ui;
pub mod render;
pub mod rat_state;
pub mod context;
pub use ui::run_ui;
pub use rat_state::*;
pub use context::*;

View File

@@ -0,0 +1,8 @@
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum UiContext {
Intro,
Login,
Admin,
Dialog,
}

View File

@@ -152,6 +152,9 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
}
// No count update needed for UpdatedExisting or NoChange
}
EventOutcome::ButtonSelected { context, index } => {
event_handler.command_message = "Internal error: Unexpected button state".to_string();
}
},
Err(e) => {
// Handle errors from handle_event, e.g., log or display