Pop-up Menu
Hey all,
I'm wondering if anyone can advise, or direct me to a tutorial for creating a pop-up menu for my app?
(This meaning, if I press a button within my game a menu-box with some text can pop up on the screen. And then if I press another button within that menu, the menu will disappear again..)
Thanks so much!
I'm wondering if anyone can advise, or direct me to a tutorial for creating a pop-up menu for my app?
(This meaning, if I press a button within my game a menu-box with some text can pop up on the screen. And then if I press another button within that menu, the menu will disappear again..)
Thanks so much!
Comments
you can have the menu off-screen and trigger with:
-a gameAttribute (suggest Index type, though boolean works) named Menu
on button in gamePlay:
Rule: when
Event: touched is pressed
--changeAttribute: game.Menu To: 1 (or true if boolean, though 1 also works)
on menu items (have their Position.X set to correct X for when on-screen):
on Prototypes:
-add attribute real type named screenY and set at the correct on-screen Y
-add attribute real type named OffscreenY and set at the correct off-screen Y
Rule: when
Attribute: game.Menu = 1 (or is true)
--changeAttribute: self.Position.Y To: screenY
Otherwise:
--changeAttribute: self.Position.Y To: OffscreenY
on the menu button:
Rule: when
Event: touched is pressed
--changeAttribute: game.Menu To: 0 (or false if boolean, though 0 also works)
or still using attributes to change states
you can interpolate things … or change Color.Alpha … or pause game with a pause scene
@};- MH
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User