it seems I'm not able to get mouse wheel delta from orx.
The same problem compares to orx 1.6 and 1.7.
In my application class, a scroll based class, i have a sequence of calls in the Run() function:
I can detect mouse movement and button pressures but nothing about wheel delta.
In orxMouse.c of GLFW plugin, in function orxMouse_GLFW_MouseWheelCallback() I see sstMouse.fWheelMove is set with a value corresponding the wheel movement.
The problem is that before I call orxMouse_GetWheelDelta() to get the value, orxMouse_GLFW_Clean() is called by orxClock_Update() and it blanks the value.
Am I missing something or wheel mouse handling is not working at all (and no one used it then no one niticed it
I just did a quick test and everything is working fine here.
I've tested the two options:
- calling orxMouse_GetWheelDelta() directly (albeit not recommended)
- using the input system (MOUSE_WHEEL_UP/MOUSE_WHEEL_DOWN, which is the recommended way)
I got the correct values in both cases.
As stated above, the recommended way to query physical input status is to go through the input module. It works in all the cases *except* for multi-touches.
If you still want to call directly the orxMouse API, make sure to do so from a clock update function that was registered with a priority of either low, normal or high. Any other priority won't work (not even mentioning calling the API from outside the clock update system).
As a FYI, were you to use the input module instead, the restriction for polling input values are slightly looser.
can you provide me the code you used in your quick test?
I'd like to understand behaviour differences.
When you're saying "input system" do you mean I should edit ini file and add an entry in [Input] section or call orxInput_Bind to add a new entry programmatically?
I simply called orxMouse_GetWheelDelta() / orxInput_GetValue() in the Update() function of Bounce.c (orx's playground).
The way you bind the inputs, be it through manually or programmatically edited config or with direct calls to the orxInput API doesn't matter: they will all result in the same bindings and you won't see any difference when querying input values/statuses (orxInput_GetValue()/orxInput_HasNewStatus()).