Clean up shared UI runtime state
This commit is contained in:
1 parent
9b4c690916
commit
5ca244528f
27 files changed
+355
-499
No files matched your search
+7
-7
@@ -1,15 +1,15 @@
|
||||
use iris::prelude::*;
|
||||
|
||||
fn main() {
|
||||
DefaultApp::<State>::run();
|
||||
DesktopApp::<State>::run();
|
||||
}
|
||||
|
||||
#[derive(DefaultUiState)]
|
||||
#[derive(DesktopUiState)]
|
||||
struct State {
|
||||
ui_state: DefaultUiState,
|
||||
ui_state: DesktopUiState,
|
||||
}
|
||||
|
||||
type Rsc = DefaultRsc<State>;
|
||||
type Rsc = DesktopRsc<State>;
|
||||
|
||||
#[derive(Clone, Copy, WidgetView)]
|
||||
struct Test {
|
||||
@@ -35,10 +35,10 @@ impl Test {
|
||||
}
|
||||
}
|
||||
|
||||
impl DefaultAppState for State {
|
||||
impl DesktopAppState for State {
|
||||
fn new(
|
||||
mut ui_state: DefaultUiState,
|
||||
rsc: &mut DefaultRsc<Self>,
|
||||
mut ui_state: DesktopUiState,
|
||||
rsc: &mut DesktopRsc<Self>,
|
||||
_: Proxy<Self::Event>,
|
||||
) -> Self {
|
||||
let test = Test::new(rsc);
|
||||
|
||||
Reference in new issue
Block a user