Make checkbox not visible, but still functional.

0 favourites
  • 5 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hello!

    Currently, I am trying to make a checkbox control my fullscreen/windowed mode function in my game. I am trying to get the checkbox to go underneath the sprites I am using for the artwork of the checkbox, however when I send the box to the bottom layer, it's still visible on the top layer. Basically, I want the checkbox to be not visible on screen, but still able to be used. Is there any way of doing this easily? Or at all? Massive thanks to anyone who is able to help.

  • Checkbox is a Form Control, and as all form controls it's rendered above the canvas.

    Checkbox is a pretty simple object, you can easily make your own version with a sprite. Add a boolean instance variable, on click change the variable and animation frame. That's it!

  • Awesome, thank you! However, I'm still trying to figure out how to allow the frame to change back and forth between true and false by clicking on it, if that makes sense. Like when I click the sprite, it changes frames, but when I click again nothing happens. And then how would I apply this to making the game go to fullscreen and windowed mode? Thanks again!

  • Create a sprite MyCheckBox, add an instance boolean variable FullScreen. Add two frames to this sprite, set animation speed to 0.

    Then do this:

    Mouse on clicked MyCheckBox 
     -> MyCheckBox toggle boolean variable FullScreen
     -> MyCheckBox set animation frame to self.FullScreen

    Since boolean "true" is 1, and boolean "false" is 0, then the animation frame will be set either to 1 or 0.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That's awesome. Thanks a bunch! I really appreciate your help!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)