@r_gigante
Well ... this is embarrassing.
I came up with the R21 code using notes I had collected over the years, and was rather confused seeing this didn't port over to R20.
Actually the correct code should look like following:
Bool MyUserArea::InputEvent(const BaseContainer& msg)
{
const Int32 dev = msg.GetInt32(BFM_INPUT_DEVICE);
const Int32 chn = msg.GetInt32(BFM_INPUT_CHANNEL);
if (dev == BFM_INPUT_MOUSE)
{
if (chn == BFM_INPUT_MOUSEWHEEL)
{
const Float wheel = msg.GetFloat(BFM_INPUT_VSCROLL) / 120.0;
Int32 mx = msg.GetInt32(BFM_INPUT_X);
Int32 my = msg.GetInt32(BFM_INPUT_Y);
Global2Local(&mx, &my);
ApplicationOutput("Mousewheel value @ at x=@, y=@", wheel, mx, my);
return true;
}
}
return false;
}
No need at all to perform a GetInputState to obtain the the x and y coordinates from, as the BaseContainer to get it from is already provided as "msg". And this works both for R21 and R20.
Man ... sometimes you think you know what you're doing, and then it seems you just know squad. Embarrassing!
Riccardo, terribly sorry for wasting your time!