Skip to content

Commit bdacda4

Browse files
committed
Add Dialog view to show instructions
1 parent cf76ce1 commit bdacda4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ async fn main() -> Result<(), DbErr> {
7777
s.add_layer(dialog);
7878
});
7979

80+
siv.add_global_callback('i', |s| {
81+
let dialog = Dialog::new()
82+
.title("Info")
83+
.padding_lrtb(1, 1, 1, 0)
84+
.content(
85+
TextView::new("Press 'a' to add task.\nPress 'q' to quit.\nPress 'Enter' on a task to mark it done/undone.")
86+
)
87+
.dismiss_button("Ok");
88+
s.add_layer(dialog);
89+
});
90+
8091
siv.run();
8192

8293
Ok(())

0 commit comments

Comments
 (0)