Switch between different canvas (Game menu)


#1

Hy there,
Currently, I try to make a Game menu.
I got a canvas with the main menu
one with the settings page
and one with the level selection page.
maybe there will come more, but for describing purposes it’s enough.

I can’t figure out, how to open those at specific events/time.

I want, for example, if the user clicks on the play button the main menu should disappear and the level selection canvas should appear. (and back)

Is it possible to do this with nodes?
or how to do this in code? (I’m a very beginner)

Thanks for your responses.


#2

You might try something like this ( I haven’t tested it ):

image

You add and remove your different canvas traits on your camera ( or wherever the canvas traits are applied ) when you want to change the menu.


#3

I just realized that those “String” nodes in the screenshot should be “Trait” nodes. Then you put the trait name in the textbox of the “Trait” node.


#4

Thanks for your answer I will check it out as soon as I get my Aromry acces back.
Cheers