destroy or set invisible for a popup menu which is better

0 favourites
  • 3 posts
From the Asset Store
ready made menu you can download this one or just follow my tutorial to make it yourself
  • two layer on each of the layout, the top layout have the popup menu on game on the bottom one.

    lets say you have 50 level each time player win a game a menu with

    Back, replay and next button popup in the middle of the screen...

    set invisible

    is it better to set the layer invisible on start of layout and set visible when game ends..

    Pros is:- it works

    Cons is:- Back, replay and next button still press although the layer is invisible

    maybe:- this method takes up memory why i am asking you guys

    fix to touch issue is:- put Back, replay and next button in a group on set group deactivated on reactivate when win

    destroy

    is it better to put it off screen set destroy outside and spawn it when the player wins a level

    pros is:- i am just asking before i waste my time to try this one

    cons is:- ...

    maybe: this method save memory and cpu usage

  • One of my beta testers just found this same bug in my app. Even though the button was invisible, he could still click on it. My solution, rather than go through the whole process of destroy, create, move... I just disabled the button.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you could just add a condition to the button event "button/layer/etc. is visible", then the event only fires when you want it to

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