Use one standard Iris resource bundle
This commit is contained in:
1 parent
6dbc800739
commit
7e5a4c0071
16 files changed
+129
-100
No files matched your search
@@ -13,15 +13,11 @@ struct State {
|
||||
}
|
||||
|
||||
impl DesktopAppState for State {
|
||||
fn new(
|
||||
mut ui_state: DesktopUiState,
|
||||
rsc: &mut DesktopRsc<Self>,
|
||||
_: Proxy<Self::Event>,
|
||||
) -> Self {
|
||||
fn new(mut ui_state: DesktopUiState, rsc: &mut StdRsc<Self>, _: Proxy<Self::Event>) -> Self {
|
||||
let mut span = Span::empty(Dir::DOWN);
|
||||
for _ in 0..ROWS {
|
||||
let img = image::DynamicImage::new_rgba8(32, 32);
|
||||
let widget = image::<DesktopRsc<Self>>(img)(rsc);
|
||||
let widget = image::<StdRsc<Self>>(img)(rsc);
|
||||
let widget = rsc.ui.widgets.add_strong(widget);
|
||||
span.push(widget.any());
|
||||
}
|
||||
@@ -40,7 +36,7 @@ impl DesktopAppState for State {
|
||||
}
|
||||
}
|
||||
|
||||
fn window_event(&mut self, event: winit::event::WindowEvent, rsc: &mut DesktopRsc<Self>) {
|
||||
fn window_event(&mut self, event: winit::event::WindowEvent, rsc: &mut StdRsc<Self>) {
|
||||
if !matches!(event, winit::event::WindowEvent::RedrawRequested) {
|
||||
return;
|
||||
}
|
||||
@@ -53,7 +49,7 @@ impl DesktopAppState for State {
|
||||
if self.frame == SETTLE_FRAMES && !self.appended {
|
||||
self.appended = true;
|
||||
let img = image::DynamicImage::new_rgba8(32, 32);
|
||||
let widget = image::<DesktopRsc<Self>>(img)(rsc);
|
||||
let widget = image::<StdRsc<Self>>(img)(rsc);
|
||||
let widget = rsc.ui.widgets.add_strong(widget);
|
||||
rsc.ui
|
||||
.widgets
|
||||
|
||||
Reference in new issue
Block a user