• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Button click to show text

D

delusan

Guest
Trying to show text by clicking on a button, but just can't figure it out. Any help would be appreciated.
 
T

TinyGamesLab

Guest
Toogle a variable whenever you click the button and then use this variable to show/hide the text.
Ex:
Code:
//create event
Toogle = false;

//click event
If (Toogle) {
   Toogle = false;
} else {
   Toogle = true;
}

//draw event
If (Toogle) {
   draw_text(x, y, "text");
}
 
D

delusan

Guest
Toogle a variable whenever you click the button and then use this variable to show/hide the text.
Ex:
Code:
//create event
Toogle = false;

//click event
If (Toogle) {
   Toogle = false;
} else {
   Toogle = true;
}

//draw event
If (Toogle) {
   draw_text(x, y, "text");
}
The create, click and draw events all go in the button object?
 
Top