How to define that a button is a toggle? -> use Normal and OnNormal

Hi,

Before, the previous post about On active and active in guistyle, I was using a piece a script with 3 Gui style, (the active state one, the non active state, and the style used in the scene).

I would like to know how can I define my GUI.button(rect, “”, myGuistyle); as a button which use 2 states ?

thank’s

BooBi

well you could use GUI.toggle, but so far i couldn’t find how to hide the toggle button and use an image instead

use GUI.toggle and style it as a button.

It seems that there is a problem here,

I want a button, with 2 textures (for the button so one on, one off)

When I click on the button I what it to do what’s in the if(GUI.button…){ Do my thing }, and use the OnActive/OnNormal/… textures.
Then If i click again on it, do what’s in my if again, and use my Active/Normal/… textures.

What’s the boolean for ? (in the toggle), I don’t want to turn on and off my button (like enable/disable the button) I want to change his state, activate or non activate.

Do someone knows how to do that ?

Ok found the solution cheers for the help.