Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Radiant on Thu 03/10/2013 22:17:04

Title: (solved) Mousewheel over GUI
Post by: Radiant on Thu 03/10/2013 22:17:04
How do I detect the mousewheel being used over a GUI? The normal method (on_mouse_click) doesn't register on GUIs, and the variant (on_event eEventGUIMouseDown) doesn't seem to offer a way to detect which way the mousewheel is turned.
Title: Re: Mousewheel over GUI
Post by: Khris on Thu 03/10/2013 22:37:49
I tested this and I was able to use on_mouse_click, the GUI has to be clickable though.

It looks like since mouse.IsButtonDown only works with eMouseLeft, Middle and Right, turning the mouse wheel does trigger on_mouse_click and not on_event over GUIs; I'm guessing because otherwise there actually wouldn't be a way to catch scrolling over a GUI.
Title: Re: Mousewheel over GUI
Post by: Radiant on Thu 03/10/2013 23:06:00
And that fixed it, thanks.