diff options
| author | Julian Hurst <ark@mansus.space> | 2025-03-17 16:58:07 +0100 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2025-03-17 16:58:07 +0100 |
| commit | 0d0186d63712472a037cf510812e68774c73c12f (patch) | |
| tree | 48ec90686ede65cb8a9cb126bdc2cacfd9a202a8 /cmd | |
| parent | e074c936bb99ccfce311445f4dbf42ba964b44a4 (diff) | |
| download | hare-tui-0d0186d63712472a037cf510812e68774c73c12f.tar.gz | |
Add initial support for damage tracking
This also fixes a styling issue when the widget styles its own text.
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/list.ha | 2 | ||||
| -rw-r--r-- | cmd/text.ha | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/cmd/list.ha b/cmd/list.ha index 1db46b4..348083e 100644 --- a/cmd/list.ha +++ b/cmd/list.ha @@ -15,6 +15,8 @@ export fn main() void = { colorfg = widget::color::REDFG, colorbg = widget::color::REDBG, },"hello", "world", "bye", "world")!; + let l = layout::newvlayout(&li); + defer l.layout.finish(&l); l.layout.print(&l); }; diff --git a/cmd/text.ha b/cmd/text.ha index f7ce1fc..7c569a8 100644 --- a/cmd/text.ha +++ b/cmd/text.ha @@ -17,7 +17,7 @@ export fn main() void = { let l = layout::newvlayout(&txt); l.layout.print(&l); - tui::clear(&state); + //tui::clear(&state); time::sleep(1 * time::SECOND); let st = txt.widget.style as *widget::style; @@ -25,37 +25,37 @@ export fn main() void = { text::settext(&txt, "bye world"); l.layout.print(&l); - tui::clear(&state); + //tui::clear(&state); time::sleep(1 * time::SECOND); st.colorfg = widget::color::BROWNFG; l.layout.print(&l); - tui::clear(&state); + //tui::clear(&state); time::sleep(1 * time::SECOND); st.colorfg = widget::color::BLUEFG; l.layout.print(&l); - tui::clear(&state); + //tui::clear(&state); time::sleep(1 * time::SECOND); st.colorfg = widget::color::MAGENTAFG; l.layout.print(&l); - tui::clear(&state); + //tui::clear(&state); time::sleep(1 * time::SECOND); st.colorfg = widget::color::CYANFG; l.layout.print(&l); - tui::clear(&state); + //tui::clear(&state); time::sleep(1 * time::SECOND); st.colorfg = widget::color::WHITEFG; l.layout.print(&l); - tui::clear(&state); + //tui::clear(&state); time::sleep(1 * time::SECOND); st.colorfg = widget::color::DEFAULTFG; |
