diff options
Diffstat (limited to 'examples/integration')
| -rw-r--r-- | examples/integration/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/integration/src/controls.rs | 10 | ||||
| -rw-r--r-- | examples/integration/src/main.rs | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/examples/integration/Cargo.toml b/examples/integration/Cargo.toml index a4a961f8..7f8feb3f 100644 --- a/examples/integration/Cargo.toml +++ b/examples/integration/Cargo.toml @@ -8,7 +8,9 @@ publish = false [dependencies] iced_winit.workspace = true iced_wgpu.workspace = true + iced_widget.workspace = true +iced_widget.features = ["wgpu"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies] tracing-subscriber = "0.3" diff --git a/examples/integration/src/controls.rs b/examples/integration/src/controls.rs index 28050f8a..d0654996 100644 --- a/examples/integration/src/controls.rs +++ b/examples/integration/src/controls.rs @@ -2,7 +2,7 @@ use iced_wgpu::Renderer; use iced_widget::{column, container, row, slider, text, text_input}; use iced_winit::core::alignment; use iced_winit::core::{Color, Element, Length, Theme}; -use iced_winit::runtime::{Command, Program}; +use iced_winit::runtime::{Program, Task}; pub struct Controls { background_color: Color, @@ -33,7 +33,7 @@ impl Program for Controls { type Message = Message; type Renderer = Renderer; - fn update(&mut self, message: Message) -> Command<Message> { + fn update(&mut self, message: Message) -> Task<Message> { match message { Message::BackgroundColorChanged(color) => { self.background_color = color; @@ -43,7 +43,7 @@ impl Program for Controls { } } - Command::none() + Task::none() } fn view(&self) -> Element<Message, Theme, Renderer> { @@ -78,9 +78,7 @@ impl Program for Controls { container( column