How can I change Toolbar/SelectionGrid selected item's text color?

How can I change Toolbar/SelectionGrid selected item’s text color?

The first thing I did is to look in the GUISkin for those controls, but I saw that they aren’t in the GUISkin. I suppose that their style is inferred from other controls like label/button. I have changed every possible text color in button and label in the GUISkin, but that changed only the non-selected items text colors. The selected item’s color remained white(the default).

NOTE: I am using Unity v3.4

In a GUIStyle, there are background image and text color settings for several states:

  • Normal - used when the button is not selected and the mouse isn’t over it
  • Hover - used when the button is not selected but the mouse is over it
  • Active - used when the button is not selected but it’s being clicked
  • Focused - not sure this is used for buttons at all… someone correct this if I’m wrong!

There are also the following states, which are just like the ones above, except that they are applied when the button is already selected, or “On”.

  • On Normal - used when the button is selected and the mouse isn’t over it
  • On Hover - used when the button is selected and the mouse is over it
  • On Active - used when the button is selected and it’s being clicked
  • On Focused - again, I’m pretty sure this isn’t used for buttons…

The naming conventions didn’t make sense to me until I realized that “On ____” wasn’t a reference to an event, but rather the state of the button. For example, “On Hover” isn’t for the moment that a hover event occurs; it is used when hovering over an button that’s on/selected/depressed (whatever you want to call it).

Hope this helps clarify things! Cheers!