Advertisement
Guest User

Untitled

a guest
Dec 4th, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. Button@ button;
  2. void StartDelayed(){
  3. window = Window();
  4. ui.root.AddChild(window);
  5. window.SetMinSize(384, 192);
  6. window.SetLayout(LM_VERTICAL, 6, IntRect(6, 6, 6, 6));
  7. window.SetAlignment(HA_CENTER, VA_CENTER);
  8. window.SetStyleAuto();
  9. logoSprite.visible=false;
  10. button = Button();
  11. button.name = "Button";
  12. button.minHeight = 24;
  13. window.AddChild(button);
  14. button.SetStyleAuto();
  15. SubscribeToEvent(button, "Pressed", "HandleClosePressed");
  16. }
  17.  
  18. void HandleClosePressed(){
  19. LoadGM();
  20. }
  21.  
  22. void LoadGM(){
  23. UnsubscribeFromEvents(button);
  24. ui.root.RemoveChild(window);
  25. input.mouseVisible=false;
  26. CreateScene();
  27. CreateCharacter();
  28. InitAudio();
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement