Draft Scrollable widget (no clipping yet!)
This commit is contained in:
parent
4769272122
commit
719c073fc6
13 changed files with 526 additions and 50 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue