Mikael Gyth
Topic Author
Posts: 33
Joined: 15 Aug 2013, 12:53

Mobile device multi-button best practice

28 Feb 2014, 09:38

Hello.
I've encountered a small problem while working with NoesisGUI on a project.
We wanted to display three buttons on screen, one for speed and two for right and left.
They are to be used on mobile devices, so they will receive input from a touch screen.
I made them RepeatButtons, and i hook up a handler to the Click event on each button. This works fairly well, however the problem is that the player will need to be able to press the "Speed" button at the same time as one of the left/right buttons. And with the current configuration, when I hold one button and press another one, the first button stops firing events.

Can anyone give me some advice on how to fix this, and if this is even the right way to do it?
 
User avatar
jsantos
Site Admin
Posts: 4266
Joined: 20 Jan 2012, 17:18
Contact:

Re: Mobile device multi-button best practice

28 Feb 2014, 17:17

Hi Mikael,

You are doing it right. The problem is that our buttons are not multitouch aware, they are handling only the mouse event (touch events are converted to mouse events when not handled) and the mouse can only be located in one position at the same time.

For now, you could hack it by attaching to the TouchDown event of the button or if you are not in a hurry wait for us to solve it. It has been reported by more customers.
 
Mikael Gyth
Topic Author
Posts: 33
Joined: 15 Aug 2013, 12:53

Re: Mobile device multi-button best practice

03 Mar 2014, 08:47

I was considering just setting boleans with the touch down and touch up evens and firing commands from the Update while the boolean is true. This would also set the rate of commands sent to the same rate as the input from Axis in Unity.
Sounds like a good solution?
 
User avatar
jsantos
Site Admin
Posts: 4266
Joined: 20 Jan 2012, 17:18
Contact:

Re: Mobile device multi-button best practice

03 Mar 2014, 20:40

I would take the faster solution. Don't dedicate time to find an elegant way because as I said we are going to fix this. So, if that is working for you I will leave it as it for now.
 
Mikael Gyth
Topic Author
Posts: 33
Joined: 15 Aug 2013, 12:53

Re: Mobile device multi-button best practice

06 Mar 2014, 19:33

Hello.
My solution did work reasonably well, but was very unstable (Sometimes the events would not register and booleans would get "stuck".
I know it's hard to tell but when would you estimate that multitouch will be adressed in NoesisGUI?
 
User avatar
jsantos
Site Admin
Posts: 4266
Joined: 20 Jan 2012, 17:18
Contact:

Re: Mobile device multi-button best practice

08 Mar 2014, 20:15

I don't understand why the solution is unstable. Could you ellaborate it a bit more? Let me see if I can help.

This multitouch issue is planned to be solved in noesisGUI v1.2 whose release date is estimated to be at the end of this month. Although it will be probably delayed. The beta will be sooner, I will try to provide you one as soon as this feature is incorporated for testing.

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests