intigrate focus system with tui

This commit is contained in:
Evan Almloff committed 2022-05-03 11:02:35 -05:00
1 parent 7a17683447
commit 35ee243d0d
5 files changed
+132 -20

No files matched your search

+3 -2
View File
@@ -41,7 +41,7 @@ impl<'a> RinkBuffer<'a> {
}
pub trait RinkWidget {
fn render(self, area: Rect, buf: RinkBuffer);
fn render(self, area: Rect, buf: &mut RinkBuffer);
}
pub struct WidgetWithContext<T: RinkWidget> {
@@ -57,7 +57,8 @@ impl<T: RinkWidget> WidgetWithContext<T> {
impl<T: RinkWidget> Widget for WidgetWithContext<T> {
fn render(self, area: Rect, buf: &mut Buffer) {
self.widget.render(area, RinkBuffer::new(buf, self.config))
let mut rbuf = RinkBuffer::new(buf, self.config);
self.widget.render(area, &mut rbuf);
}
}