-
- Mikael Gyth
- Posts: 33
- Joined:
Mobile device multi-button best practice
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?
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?
Re: Mobile device multi-button best practice
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.
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
- Posts: 33
- Joined:
Re: Mobile device multi-button best practice
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?
Sounds like a good solution?
Re: Mobile device multi-button best practice
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
- Posts: 33
- Joined:
Re: Mobile device multi-button best practice
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?
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?
Re: Mobile device multi-button best practice
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.
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