I have two custom menu systems in my game. One for verbs, one for dialog. They work pretty similarly: the menu pops up, enters a while loop sort of like this:
Code: ags
(They're more complicated than that, checking for mouse movement as well.)
Basically, I want to add the ability to scroll the menu with the mousewheel during this loop. But apparently eMouseWheelNorth and eMouseWheelSouth can ONLY be detected by on_mouse_click. And on_mouse_click does not fire during a while loop. Is there any workaround?
bool chosen;
while (chosen==false) {
if (IsKeyPressed(eKeyDownArrow)) [[[scroll menu down]]]
if (IsKeyPressed(eKeyUpArrow)) [[[scroll menu down]]]
if (IsKeyPressed(eKeyReturn) || Mouse.IsButtonDown(eMouseLeft)) chosen = true;
Wait(1);
}
(They're more complicated than that, checking for mouse movement as well.)
Basically, I want to add the ability to scroll the menu with the mousewheel during this loop. But apparently eMouseWheelNorth and eMouseWheelSouth can ONLY be detected by on_mouse_click. And on_mouse_click does not fire during a while loop. Is there any workaround?