ui/src/gui_handler/gui/topgui.rs

20 lines
733 B
Rust
Raw Normal View History

2023-01-16 09:53:52 +00:00
/// A trait that is used by the gui handler as the target for input
use anyhow::Result;
pub trait TopGui: Send + Sync {
/// Decline method which is executed on `InputMap::B` press
fn decline(&self) -> Result<()>;
/// Method which is executed on `InputMap::RightButton` press
///
/// # Arguments
/// * `second_level` adds support for multiple tab layers, e.g. RB and RT press on controller
fn next_tab(&self, second_level: bool) -> Result<()>;
/// Method which is executed on `InputMap::LeftButton` press
/// ///
/// # Arguments
/// * `second_level` adds support for multiple tab layers, e.g. RB and RT press on controller
fn previous_tab(&self, second_level: bool) -> Result<()>;
}