Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: yeahus on April 02, 2015, 06:01:37 AM

Title: Button stuck on Hover
Post by: yeahus on April 02, 2015, 06:01:37 AM
I hate to be really vague, but something has happened to my project that has caused all buttons in one scene (but not all scenes) to get stuck in their hover states until the next input. I've done the usual googling but can't see an easy explanation anywhere - any ideas?

Thanks.
Title: Re: Button stuck on Hover
Post by: ArenMook on April 04, 2015, 03:52:54 AM
You mean visually? Sounds like you've changed the starting state of some button prefab.
Title: Re: Button stuck on Hover
Post by: yeahus on April 07, 2015, 05:33:53 AM
Yeah visually. None of the buttons are prefabs, not sure what you mean?
Title: Re: Button stuck on Hover
Post by: ArenMook on April 07, 2015, 09:09:08 AM
Then I don't understand what you mean by them getting stuck in a hover state. The button script simply changes the color and/or sprite of the referenced UISprite based on the button's state.
Title: Re: Button stuck on Hover
Post by: yeahus on April 07, 2015, 11:35:35 AM
I just stuck a quick test script on one of the buttons and it's actually not just visually - it's stuck in the hover state until another button is pressed?
Title: Re: Button stuck on Hover
Post by: yeahus on April 09, 2015, 05:33:59 AM
Any ideas @ArenMook? Sorry to be annoying, it's all a bit bizarre!
Title: Re: Button stuck on Hover
Post by: ArenMook on April 09, 2015, 03:55:51 PM
You aren't giving me enough information to go on here.

The only way a button will get "stuck" in a highlighted state in NGUI is if the mouse hovers over it, or if you use keyboard/controller input and the button gets selected.

UIKeyNavigation has the "starts selected" option.