Button click to show text

Discussion in 'Programming' started by delusan, Dec 6, 2018.

  1. delusan

    delusan Member

    Joined:
    Feb 9, 2017
    Posts:
    7
    Trying to show text by clicking on a button, but just can't figure it out. Any help would be appreciated.
     
  2. TinyGamesLab

    TinyGamesLab Member

    Joined:
    Jun 21, 2018
    Posts:
    77
    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");
    }
    
     
  3. delusan

    delusan Member

    Joined:
    Feb 9, 2017
    Posts:
    7
    The create, click and draw events all go in the button object?
     
  4. delusan

    delusan Member

    Joined:
    Feb 9, 2017
    Posts:
    7
    Thank you. Got it!
     
    Psycho_666 and TinyGamesLab like this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice