This site requires JavaScript, please enable it in your browser!
Greenfoot back
Cambodude12345
Cambodude12345 wrote ...

2013/12/20

I am working on the marbles game from book-scenarios chapter 10, i need a menu screen

Cambodude12345 Cambodude12345

2013/12/20

#
So i am working in a java class and we have to edit code to make the game more different. I am making a main menu screen for mine. Does anyone know how to make the menu screen spawn first (the menu screen is MainMenu.class) it is an actor so i can spawn it on top of the normal map. i also have 5 buttons that i will work with after. one button is called Play Easy. I want it so when you press run, it shows the menu screen i made and when i press Play Easy, all the buttons will disappear including the menu screen. I also need the marble and the gold marble to not be seen in the menu screen
danpost danpost

2013/12/22

#
You can use the 'started' method to add the MainMenu and buttons into the world. You may or may not need to have some 'act' methods (or parts of them) run only on the condition that no MainMenu object exists in the world. Making the image of the MainMenu as large as your world will prevent unwanted mouse actions on objects in your world. Use the 'setPaintOrder' method to ensure the buttons are on top, followed by the MainMenu object.
You need to login to post a reply.