we compiled centralized system for select
This commit is contained in:
@@ -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::*;
|
||||
|
||||
8
client/src/ui/handlers/context.rs
Normal file
8
client/src/ui/handlers/context.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum UiContext {
|
||||
Intro,
|
||||
Login,
|
||||
Admin,
|
||||
Dialog,
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user