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

@@ -1,7 +1,7 @@
use crate::state::state::AppState;
pub fn handle_intro_selection(app_state: &mut AppState) {
match app_state.ui.intro_state.selected_option {
pub fn handle_intro_selection(app_state: &mut AppState, index: usize) { // Add index parameter
match index { // Use index directly
0 => { // Continue
app_state.ui.show_form = true;
app_state.ui.show_admin = false;
@@ -21,3 +21,4 @@ pub fn handle_intro_selection(app_state: &mut AppState) {
}
app_state.ui.show_intro = false;
}