GUI Display

Hey everyone, I’m currently working on a game for a class I have and I need just a little bit of help.

This is what the code looks like…

var Cactus : Texture2D;
var Cactus2 : Texture2D;
var button1clicked=false;

function OnGUI () {
	if (GUI.Button (Rect (375, 100, 150, 100), Cactus)) {
		if(!button1clicked)
			button1clicked=true;
		else
			button1clicked=false;
	}
	
	if(button1clicked){
		GUI.Box(Rect(375, 210, 315, 300), "");
		GUI.Label(Rect(375, 210, 90, 90),"Cactus");
		GUI.Box(Rect(10, 370, 350, 140), Cactus2);
	}	
}

What I want to happen is when I click another button, the previous button is deactivated.

Does anyone know what the code would look like?
All the help would be greatly appreciated! :smiley:

you will need something like

`if(button){

button2 = false
}`

and a second one for the other way or wrap it in a case statment.