Refactored the frontend to work with static widgets #11
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user