moved introstate into the state folder

This commit is contained in:
filipriec
2025-04-14 16:24:21 +02:00
parent 990ec9317f
commit 1c31d4cd1c
5 changed files with 100 additions and 95 deletions

View File

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