feat: get desktop working with just creation

This commit is contained in:
Jonathan Kelley committed 2022-11-15 18:32:48 -08:00
1 parent 8caabb97d8
commit e8ae830cf2
16 files changed
+1301 -329

No files matched your search

+11 -4
View File
@@ -6,11 +6,18 @@ use std::{
rc::Rc,
};
pub struct UiEvent<T> {
bubble_state: Cell<bool>,
data: Rc<T>,
pub struct UiEvent<T: 'static> {
pub(crate) bubble_state: Cell<bool>,
pub(crate) data: Rc<T>,
}
impl<T> Clone for UiEvent<T> {
fn clone(&self) -> Self {
Self {
bubble_state: self.bubble_state.clone(),
data: self.data.clone(),
}
}
}
impl<T> UiEvent<T> {
pub fn cancel_bubble(&self) {
self.bubble_state.set(false);