Draft Scrollable widget (no clipping yet!)

This commit is contained in:
Héctor Ramón Jiménez 2019-10-25 03:47:34 +02:00
parent 4769272122
commit 719c073fc6
13 changed files with 526 additions and 50 deletions

View file

@ -136,6 +136,17 @@ pub trait Application {
state: conversion::button_state(state),
}));
}
WindowEvent::MouseWheel { delta, .. } => match delta {
winit::event::MouseScrollDelta::LineDelta(
delta_x,
delta_y,
) => {
events.push(Event::Mouse(
mouse::Event::WheelScrolled { delta_x, delta_y },
));
}
_ => {}
},
WindowEvent::CloseRequested => {
*control_flow = ControlFlow::Exit;
}