mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
wip: mrr
This commit is contained in:
parent
6c3a0964ec
commit
7271081fc9
10 changed files with 119 additions and 296 deletions
|
|
@ -8,13 +8,13 @@ pub struct TuiIn(
|
|||
/// Exit flag
|
||||
pub Arc<AtomicBool>,
|
||||
/// Input event
|
||||
pub Event,
|
||||
pub crossterm::event::Event,
|
||||
);
|
||||
|
||||
impl Input for TuiIn {
|
||||
type Event = Event;
|
||||
type Event = crossterm::event::Event;
|
||||
type Handled = bool;
|
||||
fn event (&self) -> &Event { &self.1 }
|
||||
fn event (&self) -> &crossterm::event::Event { &self.1 }
|
||||
fn is_done (&self) -> bool { self.0.fetch_and(true, Relaxed) }
|
||||
fn done (&self) { self.0.store(true, Relaxed); }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue