mirror of
https://codeberg.org/unspeaker/perch.git
synced 2025-12-06 09:36:42 +01:00
tengri 0.5.0, rudimentary modals
This commit is contained in:
parent
1c4991c51b
commit
a4ee3d2912
3 changed files with 23 additions and 11 deletions
16
src/view.rs
16
src/view.rs
|
|
@ -34,14 +34,26 @@ impl Content<TuiOut> for Taggart {
|
|||
Color::Rgb(96,96,96),
|
||||
Color::Rgb(48,48,48),
|
||||
Modifier::DIM
|
||||
)
|
||||
);
|
||||
let message = format!("You have {} unsaved change(s)", self.tasks.len());
|
||||
let modal = Fill::xy(Align::c(Tui::modify(false, Modifier::DIM, Tui::fg_bg(
|
||||
Color::Rgb(255,255,255),
|
||||
Color::Rgb(0, 0, 0),
|
||||
Expand::xy(2, 2, "Save?")))));
|
||||
Content::render(&modal, to)
|
||||
},
|
||||
Some(Mode::Quit { value }) => {
|
||||
to.tint_all(
|
||||
Color::Rgb(96,96,96),
|
||||
Color::Rgb(48,48,48),
|
||||
Modifier::DIM
|
||||
)
|
||||
);
|
||||
let message = format!("You have {} unsaved change(s)", self.tasks.len());
|
||||
let modal = Fill::xy(Align::c(Tui::modify(false, Modifier::DIM, Tui::fg_bg(
|
||||
Color::Rgb(255,255,255),
|
||||
Color::Rgb(0, 0, 0),
|
||||
Expand::xy(2, 2, "Save?")))));
|
||||
Content::render(&modal, to)
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue