Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monitorButtons()
- {
- self endon( "death" );
- self endon( "closeMenu" );
- self._cursorPosition = 0;
- for(;;)
- {
- button = self waittill_any_return( "Down", "Use", "Up", "Back", "Ads" );
- switch( button )
- {
- case "Down":
- self._cursorPosition++;
- if( self._cursorPosition >= self.menuOption.size ) self._cursorPosition = 0;
- self thread refreshText();
- break;
- case "Use":
- if( self._inMenu == 1 )
- {
- if( self.isFolder[self._cursorPosition] == false ) self thread [[self.menuFunction[self._cursorPosition]]]( self.menuInput[self._cursorPosition] );
- else if( self.isFolder[self._cursorPosition] == true )
- {
- self._inMenu = 0;
- for( i = 0; i <= 12; i++ )
- {
- self._menuText[i] moveOverTime( 0.4 );
- self._menuText[i].x = 400;
- }
- wait 0.4;
- self thread [[self.menuFunction[self._cursorPosition]]]( self.menuInput[self._cursorPosition] );
- self thread refreshText();
- for( i = 0; i <= 12; i++ )
- {
- self._menuText[i].x = 0;
- self._menuText[i].alpha = 0;
- self._menuText[i] fadeOverTime( 0.4 );
- }
- wait 0.4;
- for( i = 0; i <= 12; i++ ) self._menuText[i].alpha = 1;
- self._inMenu = 1;
- }
- wait 0.01;
- self thread refreshText();
- }
- break;
- case "Up":
- self._cursorPosition--;
- if( self._cursorPosition < 0 ) self._cursorPosition = self.menuOption.size - 1;
- self thread refreshText();
- break;
- case "Back":
- self thread [[self.previousDestination]]();
- wait 0.01;
- self thread refreshText();
- break;
- case "Ads":
- self thread closeMenu();
- break;
- }
- }
- }
Add Comment
Please, Sign In to add comment