A simple CPU rendered GUI IDE experience.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 95d2c5e..9f46bc6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -322,6 +322,14 @@ pub(crate) fn entry(event_loop: EventLoop) {
ed.scroll(rows);
window.request_redraw();
}
+ WindowEvent::MouseWheel {
+ device_id: _,
+ delta: MouseScrollDelta::PixelDelta(PhysicalPosition { x:_, y }),
+ phase: _,
+ } => {
+ ed.scroll(y as f32 *5.0);
+ window.request_redraw();
+ }
WindowEvent::ModifiersChanged(modifiers) => {
unsafe { MODIFIERS = modifiers.state() };
window.request_redraw();