summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-12-16 14:22:22 +0100
committerMatthias Melcher <github@matthiasm.com>2023-12-16 14:22:22 +0100
commit046bf23a5d7290861df1e020babfa2e1535a0389 (patch)
tree150f165aa8e333dca68667469e94c6c8261c420e /src
parentca028872e7a33376576eb5b039e7eafedaad90e9 (diff)
Adds mouse wheel input to Fl_Counter
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Counter.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Fl_Counter.cxx b/src/Fl_Counter.cxx
index 49fd6b32a..852658a1d 100644
--- a/src/Fl_Counter.cxx
+++ b/src/Fl_Counter.cxx
@@ -197,6 +197,9 @@ int Fl_Counter::handle(int event) {
redraw();
}
return 1;
+ case FL_MOUSEWHEEL:
+ handle_drag(clamp(increment(value(),(Fl::event_dy() - Fl::event_dx()) / 2 )));
+ return 1;
case FL_KEYBOARD :
switch (Fl::event_key()) {
case FL_Left: