From 97541e4f80ac68c97c8cb7f4daf3bf87ec9ac54a Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 10 Jul 2023 13:57:56 -0600 Subject: [PATCH] vertical SimpleWindow accept mousewheel input --- src/kiss_flixel/SimpleWindow.kiss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kiss_flixel/SimpleWindow.kiss b/src/kiss_flixel/SimpleWindow.kiss index 286cdef..efd636b 100644 --- a/src/kiss_flixel/SimpleWindow.kiss +++ b/src/kiss_flixel/SimpleWindow.kiss @@ -496,8 +496,10 @@ // Scroll wheel scroll up/down (when _useScrolling - // TODO move all controls other than xButton and scrollbar. Clamp movement by top and bottom of all controls - null) + (let [scrollAmount FlxG.mouse.wheel + scrollFunc (if (> 0 scrollAmount) _scrollDown _scrollUp)] + (doFor _ (range (Std.int (Math.abs scrollAmount))) + (scrollFunc)))) // Figure out whether to use mouse input or key/gamepad input for ui navigation (when justPressedUIButton