Handle mouse cursor in iced_wgpu

This commit is contained in:
Héctor Ramón Jiménez 2019-10-11 23:30:53 +02:00
parent 8846a239cf
commit a031a6f213
10 changed files with 104 additions and 67 deletions

View file

@ -100,7 +100,7 @@ impl Renderer {
fn draw(
&mut self,
primitive: &Primitive,
(primitive, mouse_cursor): &(Primitive, MouseCursor),
target: &mut Target,
) -> MouseCursor {
log::debug!("Drawing");
@ -152,7 +152,7 @@ impl Renderer {
self.queue.submit(&[encoder.finish()]);
MouseCursor::OutOfBounds
*mouse_cursor
}
fn draw_primitive(&mut self, primitive: &Primitive) {
@ -243,8 +243,7 @@ impl Renderer {
}
impl iced_native::Renderer for Renderer {
// TODO: Add `MouseCursor` here (?)
type Output = Primitive;
type Output = (Primitive, MouseCursor);
}
impl Windowed for Renderer {