Guest User

Untitled

a guest
Oct 19th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. monitorButtons()
  2. {
  3. self endon( "death" );
  4. self endon( "closeMenu" );
  5.  
  6. self._cursorPosition = 0;
  7.  
  8. for(;;)
  9. {
  10. button = self waittill_any_return( "Down", "Use", "Up", "Back", "Ads" );
  11.  
  12. switch( button )
  13. {
  14. case "Down":
  15. self._cursorPosition++;
  16. if( self._cursorPosition >= self.menuOption.size ) self._cursorPosition = 0;
  17. self thread refreshText();
  18. break;
  19. case "Use":
  20. if( self._inMenu == 1 )
  21. {
  22. if( self.isFolder[self._cursorPosition] == false ) self thread [[self.menuFunction[self._cursorPosition]]]( self.menuInput[self._cursorPosition] );
  23. else if( self.isFolder[self._cursorPosition] == true )
  24. {
  25. self._inMenu = 0;
  26. for( i = 0; i <= 12; i++ )
  27. {
  28. self._menuText[i] moveOverTime( 0.4 );
  29. self._menuText[i].x = 400;
  30. }
  31. wait 0.4;
  32. self thread [[self.menuFunction[self._cursorPosition]]]( self.menuInput[self._cursorPosition] );
  33. self thread refreshText();
  34. for( i = 0; i <= 12; i++ )
  35. {
  36. self._menuText[i].x = 0;
  37. self._menuText[i].alpha = 0;
  38. self._menuText[i] fadeOverTime( 0.4 );
  39. }
  40. wait 0.4;
  41. for( i = 0; i <= 12; i++ ) self._menuText[i].alpha = 1;
  42. self._inMenu = 1;
  43. }
  44. wait 0.01;
  45. self thread refreshText();
  46. }
  47. break;
  48. case "Up":
  49. self._cursorPosition--;
  50. if( self._cursorPosition < 0 ) self._cursorPosition = self.menuOption.size - 1;
  51. self thread refreshText();
  52. break;
  53. case "Back":
  54. self thread [[self.previousDestination]]();
  55. wait 0.01;
  56. self thread refreshText();
  57. break;
  58. case "Ads":
  59. self thread closeMenu();
  60. break;
  61. }
  62. }
  63. }
Add Comment
Please, Sign In to add comment