tr4np
Topic Author
Posts: 17
Joined: 26 Aug 2014, 15:33

scrollviewer dragging / how to make mouse act like touch

26 Aug 2014, 16:35

I have a scrollviewer, and I want to be able to drag it with the mouse to scroll the view. This works fine on Android, but it ignores the mouse when I try it from the Unity editor. Is there a way to make the mouse events work the same as touches? I want to be able to scroll the view by dragging with the mouse, the same way that I can scroll it be dragging with my finger on Android/iOS.

thanks,
Phong
 
User avatar
jsantos
Site Admin
Posts: 2922
Joined: 20 Jan 2012, 17:18
Contact:

Re: scrollviewer dragging / how to make mouse act like touch

26 Aug 2014, 17:23

For now, the scrollviewer only reacts to Mouse Wheel events, dragging the thumb, or clicking in the buttons. There is no emulation of touch events right now although it is probably a good idea.

In fact, if this is critical for you right now I think you could emulate it by intercepting the events in our NoesisGUIPanel class.
 
tr4np
Topic Author
Posts: 17
Joined: 26 Aug 2014, 15:33

Re: scrollviewer dragging / how to make mouse act like touch

26 Aug 2014, 19:58

Thanks for the info. I have a working UI using NGUI, and I would like to eventually replace it with NoesisGUI. I'm slowly learning about xaml and event/property binding, so it will be a while before I can make the switch.

It would be nice to unify the behavior of NoesisGUI across all platforms (so it doesn't matter if I'm using a mouse or touch interface), so emulation of touch events would be a great feature to have in a future release.

Also, I tried the scroll wheel, but it apparently doesn't work for horizontal scrollviewers.

Who is online

Users browsing this forum: Google [Bot] and 7 guests