summaryrefslogtreecommitdiffstats
path: root/examples/custom_widget/src/main.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-05-05 00:05:47 +0200
committerLibravatar GitHub <noreply@github.com>2020-05-05 00:05:47 +0200
commit7dc02a5e16a3143b7c3ba9270207e3ebda71d567 (patch)
treedd727f138641fbda008af8e7827369cc99420749 /examples/custom_widget/src/main.rs
parent27aad74a32fd8ac2b12f9d32df8a3b61a3175457 (diff)
parent93c6be5eef577f0778b5787dac37351c035ed471 (diff)
downloadiced-7dc02a5e16a3143b7c3ba9270207e3ebda71d567.tar.gz
iced-7dc02a5e16a3143b7c3ba9270207e3ebda71d567.tar.bz2
iced-7dc02a5e16a3143b7c3ba9270207e3ebda71d567.zip
Merge pull request #325 from hecrj/feature/canvas-interaction
Canvas interactivity and Game of Life example
Diffstat (limited to 'examples/custom_widget/src/main.rs')
-rw-r--r--examples/custom_widget/src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/custom_widget/src/main.rs b/examples/custom_widget/src/main.rs
index 0a570745..f096fb54 100644
--- a/examples/custom_widget/src/main.rs
+++ b/examples/custom_widget/src/main.rs
@@ -10,8 +10,8 @@ mod circle {
// if you wish to, by creating your own `Renderer` trait, which could be
// implemented by `iced_wgpu` and other renderers.
use iced_native::{
- layout, Background, Color, Element, Hasher, Layout, Length,
- MouseCursor, Point, Size, Widget,
+ layout, mouse, Background, Color, Element, Hasher, Layout, Length,
+ Point, Size, Widget,
};
use iced_wgpu::{Defaults, Primitive, Renderer};
@@ -57,7 +57,7 @@ mod circle {
_defaults: &Defaults,
layout: Layout<'_>,
_cursor_position: Point,
- ) -> (Primitive, MouseCursor) {
+ ) -> (Primitive, mouse::Interaction) {
(
Primitive::Quad {
bounds: layout.bounds(),
@@ -66,7 +66,7 @@ mod circle {
border_width: 0,
border_color: Color::TRANSPARENT,
},
- MouseCursor::OutOfBounds,
+ mouse::Interaction::default(),
)
}
}