pub struct OverlayUI<A: ActionExt> { /* private fields */ }Implementations§
Source§impl<A: ActionExt> OverlayUI<A>
impl<A: ActionExt> OverlayUI<A>
pub fn new( overlays: Box<[Box<dyn Overlay<A = A>>]>, config: OverlayConfig, ) -> Self
pub fn index(&self) -> Option<usize>
pub fn enable(&mut self, index: usize, ui_area: &Rect)
pub fn disable(&mut self)
pub fn current(&self) -> Option<&dyn Overlay<A = A>>
pub fn update_dimensions(&mut self, ui_area: &Rect)
pub fn draw(&mut self, frame: &mut Frame<'_>)
Sourcepub fn handle_input(&mut self, action: char) -> bool
pub fn handle_input(&mut self, action: char) -> bool
Returns whether the overlay was active (handled the action)
pub fn handle_action(&mut self, action: &Action<A>) -> bool
Auto Trait Implementations§
impl<A> Freeze for OverlayUI<A>
impl<A> !RefUnwindSafe for OverlayUI<A>
impl<A> !Send for OverlayUI<A>
impl<A> !Sync for OverlayUI<A>
impl<A> Unpin for OverlayUI<A>
impl<A> UnsafeUnpin for OverlayUI<A>
impl<A> !UnwindSafe for OverlayUI<A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> TransformExt for T
impl<T> TransformExt for T
fn transform<Q>(self, transform: impl FnOnce(T) -> Q) -> Q
fn modify<Q>(self, modify: impl FnOnce(&mut T) -> Q) -> T
Source§fn modify_if<Q>(self, condition: bool, modify: impl FnOnce(&mut T) -> Q) -> T
fn modify_if<Q>(self, condition: bool, modify: impl FnOnce(&mut T) -> Q) -> T
Example Read more