23 lines
429 B
Rust
23 lines
429 B
Rust
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
|
|
pub enum Page {
|
|
#[default]
|
|
Main,
|
|
Audio,
|
|
}
|
|
|
|
impl Page {
|
|
pub fn left(&mut self) {
|
|
*self = match self {
|
|
Page::Main => Page::Audio,
|
|
Page::Audio => Page::Audio,
|
|
}
|
|
}
|
|
|
|
pub fn right(&mut self) {
|
|
*self = match self {
|
|
Page::Main => Page::Main,
|
|
Page::Audio => Page::Main,
|
|
}
|
|
}
|
|
}
|