So, what i’m trying to do is to display a new button, when an other button is displayed.
And then when the new button is clicked it should dissappear.
But it won’t even appear at all now. Clicking the button won’t display it.
All the other buttons works fine though.
CODE :
#pragma strict
//Variable Initialization
var img_infoBtn : Texture;
var img_clickerBtn : Texture;
var closeClickerInfo = true;
var coins : int = 100;
function OnGUI()
{
if (GUI.Button(Rect(30, Screen.height / 2, 200, 50), img_clickerBtn))
{
Debug.Log("TEST");
}
if (GUI.Button(Rect(235, Screen.height / 2, 50, 50), img_infoBtn))
{
closeClickerInfo = false;
if (GUI.Button(Rect(240, Screen.height / 2, 50, 500), "Gives you +1 coin per second. Click me to close") && closeClickerInfo == false)
{
closeClickerInfo = true;
}
}
}