buffers are in the layers now

This commit is contained in:
filipriec
2025-04-15 19:42:12 +02:00
parent 921059bed8
commit 800b857e53
2 changed files with 29 additions and 7 deletions

View File

@@ -1,6 +1,15 @@
// src/functions/common/buffer.rs
use crate::state::app::buffer::BufferState;
use crate::state::app::buffer::AppView;
pub fn get_view_layer(view: &AppView) -> u8 {
match view {
AppView::Intro => 1,
AppView::Login | AppView::Register | AppView::Admin => 2,
AppView::Form(_) | AppView::Scratch => 3,
}
}
/// Switches the active buffer index.
pub fn switch_buffer(buffer_state: &mut BufferState, next: bool) -> bool {