Use styled chunks of text instead of plain strings
This commit is contained in:
parent
761519c1a7
commit
9b0d80873f
8 changed files with 209 additions and 66 deletions
|
|
@ -6,13 +6,14 @@ use toss::terminal::Terminal;
|
|||
fn draw(f: &mut Frame) {
|
||||
f.write(
|
||||
Pos::new(0, 0),
|
||||
"Hello world!",
|
||||
ContentStyle::default().green(),
|
||||
("Hello world!", ContentStyle::default().green()),
|
||||
);
|
||||
f.write(
|
||||
Pos::new(0, 1),
|
||||
"Press any key to exit",
|
||||
ContentStyle::default().on_dark_blue(),
|
||||
(
|
||||
"Press any key to exit",
|
||||
ContentStyle::default().on_dark_blue(),
|
||||
),
|
||||
);
|
||||
f.show_cursor(Pos::new(16, 0));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue