- Home /
Change text color on GUI.Label
Hi
I want to change text color of GUI.Label when the mouse is hovering.
I changed the hover section of GUIStyle in editor(both text color and background) but nothing happens.
For GUI.Button hovering works well but not for GUI.Label.
What's the problem?
Thanks.
Comment
Best Answer
Answer by zharik86 · Nov 08, 2014 at 11:29 AM
"Hover" works only control such button. Label is not control, but you maybe write:
public GUIStyle myLabel = null; //your style for Label
void OnGUI() {
GUI.Button(new Rect(0, 0, 100,50), "It's label", "myLabel");
}
I hope that it will help you.
Thanks,that is a good idea to use GUI.Button ins$$anonymous$$d of GUI.Label.
Your answer
Follow this Question
Related Questions
How to change text color on hover in new GUI? 10 Answers
Gui grid text color changing and mouse hover 0 Answers
Change Alpha of Text via Code? 1 Answer
How do I change the font and color of GUI text? 1 Answer
Guiskin: how to change font color? 0 Answers