intro movement fixed

This commit is contained in:
filipriec
2025-04-14 16:25:54 +02:00
parent 1c31d4cd1c
commit 7cbe5ce8be

View File

@@ -1,5 +1,4 @@
// src/state/pages/intro.rs
use ratatui::style::Modifier;
#[derive(Default, Clone, Debug)]
pub struct IntroState {
@@ -12,15 +11,15 @@ impl IntroState {
}
pub fn next_option(&mut self) {
self.selected_option = (self.selected_option + 1) % 4;
if self.selected_option < 3 {
self.selected_option += 1;
}
}
pub fn previous_option(&mut self) {
self.selected_option = if self.selected_option == 0 {
3
} else {
self.selected_option - 1
};
if self.selected_option > 0 {
self.selected_option -= 1
}
}
}