egui/crates
YgorSouza 8326fffdb0
Add raw mouse wheel event (#2782)
* Add raw mouse wheel event

The event is sent as it comes from the backend, so it will follow
different conventions depending on the target, and it is up to the user
code to deal with that. The goal is to allow advanced users to implement
alternative UI controls, e.g., using Ctrl to scroll the plot
horizontally instead of zooming, or use Shift to scroll faster instead
of changing direction.

* Change Pixel to Point for consistency

Apply suggestions from code review by emilk

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* Inline mouse wheel raw event closure

It was meant only to be able to use the same variable names without
shadowing the rest of the code, but a simple block accomplishes the same
thing.

* Use wildcard on wheel event match

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* Flip mouse wheel delta sign on web to match native

* Use wheel event data to generate scroll event

To avoid doing the same match and sign conversion twice.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-04-18 15:44:26 +02:00
..
ecolor Add badges to all crates' README.md 2023-02-12 18:08:13 +01:00
eframe Add raw mouse wheel event (#2782) 2023-04-18 15:44:26 +02:00
egui Add raw mouse wheel event (#2782) 2023-04-18 15:44:26 +02:00
egui-wgpu egui-wgpu: Support multisampling (#2878) 2023-04-13 22:29:15 +02:00
egui-winit Add raw mouse wheel event (#2782) 2023-04-18 15:44:26 +02:00
egui_demo_app demo app: use `enum` instead of strings for demo-selector anchor (#2781) 2023-03-30 09:20:07 +02:00
egui_demo_lib Fix resizable columns option in the table demo (#2780) 2023-03-29 15:53:56 +02:00
egui_extras Add option to show icon (#2910) 2023-04-18 14:55:09 +02:00
egui_glium Add #![forbid(unsafe_code)] where unsafe isn't needed (#2773) 2023-03-29 14:39:51 +02:00
egui_glow eframe: capture a screenshot using `Frame::request_screenshot` 2023-03-29 16:34:22 +02:00
egui_web Fix broken GitHub source links due to #1940 2022-08-20 15:18:02 +02:00
emath Add #![forbid(unsafe_code)] where unsafe isn't needed (#2773) 2023-03-29 14:39:51 +02:00
epaint fix epaint bytemuck dependency (#2913) 2023-04-18 14:51:38 +02:00