Refactored the frontend to work with static widgets #11

This commit is contained in:
2025-08-01 16:32:56 -05:00
parent 45db1fb774
commit 73e2c214ee
4 changed files with 39 additions and 14 deletions
+4
View File
@@ -67,6 +67,10 @@ impl Screen {
w
}
pub fn draw_widget(self: &Arc<Self>, widget: Arc<Widget>) {
self.widgets.lock().unwrap().push(widget);
}
pub fn draw_dyn<F: FnMut() -> WidgetLoad + 'static + Send + Sync>(
self: &Arc<Self>,
element: F,