I’ve got a menu with 4 buttons.
4 labels in white and black.
So I thought, when the application for label 1 is active (it should be black) I have to set in the customStyles in “Active” the black label.
But that wasn’t it.
So where’s the error.
Up to now, I’ve got at “normal” the white labels and in “hover” the black labels - works.
But where have I got to set the black ones, when the appropriated app is running?
I don’t quite understand your description of what you are doing. Could you post the relevant code snippet instead and describe what it is supposed to do?
Hmm, it haven’t much to do with the code…
But for example
if (GUILayout.Button("",GUI.skin.customStyles[7])) {
print("next");
SendMessage("next");
}
And for this button I’ve made 2 different-colored labels (black and white).
In this customStyle I defined for “normal” the white
and for “hover” and “active” the black one.
But what I wanted is following:
the attached pic is my menu - f.e. when I am in “Fotos” the black label should be active - I thought that’s the point “Active” in the customStyle… but it isn’t.
If I understand correctly, you’re asking how to change the font color of a button after you’ve clicked it and moved the mouse away? If you only want one button to be “selected” at a time, then you probably want to use GUI.Toolbar. Otherwise, you might want to use GUI.Toggle and pass a button-based style as the style parameter.