- Home /
Question by
wdarkk · Aug 17, 2011 at 08:58 PM ·
guigui-buttonenabled
How do I make a button "enabled" using GUI.Button()?
I can see how to set the styles for an "enabled" button, but not how to tell GUI.Button whether the button is "enabled" (or has keyboard focus) or not.
Comment
Best Answer
Answer by Waz · Aug 17, 2011 at 09:05 PM
Enabled is set like this:
GUI.enabled = false;
GUI.Button(...)
But when a control has keyboard focus, it uses the active style. This control is the focused control, which you can find by GUI.GetNameOfFocusedControl.
Your answer
Follow this Question
Related Questions
Move the text in a GUI Button/Box 1 Answer
On Screen Button Controls 0 Answers
How to create a gui button inside an if statement? 1 Answer