Author Topic: Exclusive Button Input/Functions  (Read 6894 times)

simongc

  • Guest
Exclusive Button Input/Functions
« on: June 05, 2012, 10:35:43 AM »
Hey,
So one of our more common bug reports for our last game using another GUI system was the ability to cause unwanted behaviour by pressing and releasing two buttons simultaneously - thus having both functions fire at the same time. Before we start coming up with our own system to handle this, we were wondering if NGUI had any built-in method for handling exclusive button presses, or if you had any preferred method or solution for handling this using NGUI.
Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Exclusive Button Input/Functions
« Reply #1 on: June 05, 2012, 01:48:27 PM »
How is clicking on two buttons at once unwanted?

Try the free version of NGUI. No sense in buying something if you can try it first.

simongc

  • Guest
Re: Exclusive Button Input/Functions
« Reply #2 on: June 05, 2012, 02:58:53 PM »
We've tried the free version of NGUI and it's efficient, clean, easy to use and exactly what we're looking for.

90% of the time two buttons at once isn't a problem. It's mostly an issue with changing panels or displaying popups. For example: If you push a button that would display a popup at the same time as you push a panel change button, the popup will then display over the next panel, instead of the current panel.

There's definitely ways to structure button and panel change logic to avoid the issue, but we were just wondering if there was an easy way using NGUI to make it so that only one of a certain set of buttons could activate at a time.



Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Exclusive Button Input/Functions
« Reply #3 on: June 05, 2012, 04:25:17 PM »
Seriously? If you're working on a touch device unhandled multiple touches can do all sorts of bad things(tm).

Imagine a confirmation screen where a user presses yes and no at the same time, or even clicking with multiple fingers on the same button. (I learned that the hard way in subway surfers).

I was actually about to ask about a feature to UICamera to enforce "single touch" like the iphone can natively, if that's doable, because otherwise I have to handle it myself in every single button, which is super uncool. :)

How is clicking on two buttons at once unwanted?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Exclusive Button Input/Functions
« Reply #4 on: June 05, 2012, 11:32:34 PM »
There's an idea.

Done. :D

simongc

  • Guest
Re: Exclusive Button Input/Functions
« Reply #5 on: June 06, 2012, 10:34:24 AM »
Thanks! That'll do the trick.

Darkmax

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 93
    • View Profile
Re: Exclusive Button Input/Functions
« Reply #6 on: November 09, 2012, 06:14:10 AM »
Just wondering if this feature is developed on ngui or not?
If it is how can I use it?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Exclusive Button Input/Functions
« Reply #7 on: November 09, 2012, 05:30:22 PM »
UICamera.allowMultiTouch

Darkmax

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 93
    • View Profile
Re: Exclusive Button Input/Functions
« Reply #8 on: November 10, 2012, 12:48:04 AM »
thanks