intro buttons fixed
This commit is contained in:
@@ -66,7 +66,7 @@ pub async fn handle_navigation_event(
|
|||||||
}
|
}
|
||||||
"select" => {
|
"select" => {
|
||||||
let (context, index) = match &router.current {
|
let (context, index) = match &router.current {
|
||||||
Page::Intro(state) => (UiContext::Intro, state.selected_option),
|
Page::Intro(state) => (UiContext::Intro, state.focused_button_index),
|
||||||
Page::Login(state) if state.focus_outside_canvas => {
|
Page::Login(state) if state.focus_outside_canvas => {
|
||||||
(UiContext::Login, state.focused_button_index)
|
(UiContext::Login, state.focused_button_index)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ pub fn render_intro(f: &mut Frame, intro_state: &IntroState, area: Rect, theme:
|
|||||||
|
|
||||||
let buttons = ["Continue", "Admin", "Login", "Register"];
|
let buttons = ["Continue", "Admin", "Login", "Register"];
|
||||||
for (i, &text) in buttons.iter().enumerate() {
|
for (i, &text) in buttons.iter().enumerate() {
|
||||||
let active = intro_state.focus_outside_canvas && intro_state.focused_button_index == i;
|
let active = intro_state.focused_button_index == i;
|
||||||
render_button(f, button_area[i], text, active, theme);
|
render_button(f, button_area[i], text, active, theme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user