Widget Scrollview and Mouse Wheel

Hi,

Within OSX builds… I was wondering if there is any way of getting a widget.newscrollview to work with the mouse wheel. At the moment I get no response if I’m trying to scroll on a scrollview using the mouse wheel and I can’t see any way to achieve this unless I completely redo all my scroll views as my own custom versions instead of using the widget…

With Apple’s Magic Mouse and other similar mice, most people are used to being able to use a central swipe / scroll wheel on the mouse as default for scrolling on web pages etc. I’d hope that the same functionality would be available within Corona as I think users will expect it if we’re to offer apps that aren’t just straight up ports of an iOS app.

Anyone know if this is possible?

Thanks,

Ian

From another forum thread:

I’m not sure if it’s in the feedback queue, but if it isn’t you should create it, and if it is, you should vote for it!

Thanks for the link. Support for mouse wheel events was added after this I believe, but not in regards to widgets and widget.newScrollView in particular.

Corona - is this in the pipeline at all? Seems odd that scroll wheel support is there but not for the scrollview, which is presumably the main place users would need the scroll wheel. Or am I missing something?

I’ve submitted a feature request. If anyone else is interested then please vote for it!

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/11517033-mouse-scroll-wheel-with-scrollview-widget

@keystagefun, you’re right, mouse scrolling has been implemented, but the solution is a combination of the InputDevice API and the axis event. My bad for not doing my research.

Are you already using these methods to obtain mouse scroll values? If so, would you mind sharing your code and how you are passing that data to the scrollView listener? If not, perhaps utilizing a combination of those two options will allow you to find a solution.

I have a project that would benefit from this as well, so I’ll be kicking the tires on it, myself. I’ll report back if I have anything useful to share.

I’m not using them yet as I figured it wouldn’t work with the widget scrollview without Corona making some changes. I will have a play with it tomorrow though. If I get anywhere I’ll let you know.

Cheers.

In the simulator I can’t get anything back using InputDevice - Corona doesn’t seem to think my mouse is connected - I just get no feedback at all.

Similarly, the axis event gives me nothing either.

I thought the OSX simulator supported these?

Alex@Panc - got something working…

https://forums.coronalabs.com/topic/61465-osx-scrollview-working-with-mouse-wheel/

Bit of a hack but it works!!

@keystagefun: Super-tight. I’m looking forward to checking it out!

From another forum thread:

I’m not sure if it’s in the feedback queue, but if it isn’t you should create it, and if it is, you should vote for it!

Thanks for the link. Support for mouse wheel events was added after this I believe, but not in regards to widgets and widget.newScrollView in particular.

Corona - is this in the pipeline at all? Seems odd that scroll wheel support is there but not for the scrollview, which is presumably the main place users would need the scroll wheel. Or am I missing something?

I’ve submitted a feature request. If anyone else is interested then please vote for it!

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/11517033-mouse-scroll-wheel-with-scrollview-widget

@keystagefun, you’re right, mouse scrolling has been implemented, but the solution is a combination of the InputDevice API and the axis event. My bad for not doing my research.

Are you already using these methods to obtain mouse scroll values? If so, would you mind sharing your code and how you are passing that data to the scrollView listener? If not, perhaps utilizing a combination of those two options will allow you to find a solution.

I have a project that would benefit from this as well, so I’ll be kicking the tires on it, myself. I’ll report back if I have anything useful to share.

I’m not using them yet as I figured it wouldn’t work with the widget scrollview without Corona making some changes. I will have a play with it tomorrow though. If I get anywhere I’ll let you know.

Cheers.

In the simulator I can’t get anything back using InputDevice - Corona doesn’t seem to think my mouse is connected - I just get no feedback at all.

Similarly, the axis event gives me nothing either.

I thought the OSX simulator supported these?

Alex@Panc - got something working…

https://forums.coronalabs.com/topic/61465-osx-scrollview-working-with-mouse-wheel/

Bit of a hack but it works!!

@keystagefun: Super-tight. I’m looking forward to checking it out!