- Home /
Any easy way to hover over a button to make it glow a bit in editor?
At first, "highlighted color" seemed to be the solution!
...Then I thought I was running into a bug where a button was getting disabled after clicking -- apparently CLICKING on the button actually makes the highlighted color STAY -- offering the illusion of "pressed in".
It's strange this is the default (since most .NET or even JS/bootstrap don't do this) -- is there a way to easily make highlighted cover HOVER ONLY?
Answer by saschandroid · Sep 30, 2016 at 12:50 PM
Set 'Navigation' to 'None' in the Button-Script component. The button stays highlighted if 'Navigation' is set to 'Auto'. This is for using a keyboard to control the buttons ... like marking them active (highlighted) with the tab-key.
Ahhhh this is it -- woww I never would've known! Very cool! Thanks mate :)
Answer by Halleester · Sep 30, 2016 at 12:36 PM
The best thing for that would still be the Color Tint transition on the Button Script. Just change the color for pressed color to the the normal color or something different from the highlighted color. The button shouldn't be stuck on a color once you click it, so I would check to make sure you don't have the "intractable" set to false or disable the button in the "On Click ()" function in the editor.
Yeaaa that was my "Plan B" -- seems that someone below answered it though for best ease-of-use: disable navigation for the btn.
The button shouldn't be stuck on a color once you click it
Funny enough, this IS the default action! I thought I did something weird, but as long as navigation is enabled and you have a highlighted color, it will "sticky press". I really think this should be a separate editor checkbox to ask if you want sticky press or not ( @Staff )~
Sorry, I guess I accidentally set something up in my scene that I tested it in. Glad you got the answer, though!