Sign in to follow this  
gamify

popup modal

Recommended Posts

Something like this ...

Alternatively, you could use me.state.pause() and allow only your modal popup to accept inputs with this boolean.

Share this post


Link to post
Share on other sites

It sounds like you will want to implement some state manager for changing between modals. We have a very rudimentary state manager for the overall game (e.g. title screen -> play screen -> game over screen, etc.) You won't be able to use it directly to manage modal menus. But you can use it as a guide for how to implement such a thing at a high level.

Some other tips:

  • Menu systems can often be implemented as a stack, where a "back button" will take you back to the previous menu, and allows for a great deal of depth for complex navigation needs.
  • Simpler navigation UIs can be implemented with as little as a single variable to store the "current menu".
  • Try not to get too crazy with it. (Personally, I am not a fan of menu-driven games like classic RPGs. I prefer games to be fun, and selecting items in a menu is not fun.)

Share this post


Link to post
Share on other sites

indeed, keep it simple I can only agree with that. And as for the UI navigation I would also use a global variable to store the reference to the current menu. And when opening a new one, you just need to close the current one and replace the global variable reference with the one from the new menu. Easy peasy :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.