示例#1
0
 public void receiveKeyPress(Keys k)
 {
     if (!spinning && (k.Equals(Keys.Escape) || Game1.options.doesInputListContain(Game1.options.menuButton, k)))
     {
         unload();
         Game1.playSound("bigDeSelect");
         Game1.currentMinigame = null;
     }
     else
     {
         if (spinning || currentlySnappedComponent == null)
         {
             return;
         }
         if (Game1.options.doesInputListContain(Game1.options.moveDownButton, k))
         {
             if (currentlySnappedComponent.Equals(spinButton10))
             {
                 currentlySnappedComponent = spinButton100;
                 Game1.setMousePosition(currentlySnappedComponent.bounds.Center);
             }
             else if (currentlySnappedComponent.Equals(spinButton100))
             {
                 currentlySnappedComponent = doneButton;
                 Game1.setMousePosition(currentlySnappedComponent.bounds.Center);
             }
         }
         else if (Game1.options.doesInputListContain(Game1.options.moveUpButton, k))
         {
             if (currentlySnappedComponent.Equals(doneButton))
             {
                 currentlySnappedComponent = spinButton100;
                 Game1.setMousePosition(currentlySnappedComponent.bounds.Center);
             }
             else if (currentlySnappedComponent.Equals(spinButton100))
             {
                 currentlySnappedComponent = spinButton10;
                 Game1.setMousePosition(currentlySnappedComponent.bounds.Center);
             }
         }
     }
 }
示例#2
0
 public void receiveKeyPress(Keys k)
 {
     if (!Game1.options.SnappyMenus)
     {
         return;
     }
     if (Game1.options.doesInputListContain(Game1.options.moveUpButton, k))
     {
         if (currentlySnappedComponent.Equals(stand))
         {
             currentlySnappedComponent = hit;
         }
         else if (currentlySnappedComponent.Equals(playAgain) && playerWon)
         {
             currentlySnappedComponent = doubleOrNothing;
         }
         else if (currentlySnappedComponent.Equals(quit) && Game1.player.clubCoins >= currentBet)
         {
             currentlySnappedComponent = playAgain;
         }
     }
     else if (Game1.options.doesInputListContain(Game1.options.moveDownButton, k))
     {
         if (currentlySnappedComponent.Equals(hit))
         {
             currentlySnappedComponent = stand;
         }
         else if (currentlySnappedComponent.Equals(doubleOrNothing))
         {
             currentlySnappedComponent = playAgain;
         }
         else if (currentlySnappedComponent.Equals(playAgain))
         {
             currentlySnappedComponent = quit;
         }
     }
     if (currentlySnappedComponent != null)
     {
         currentlySnappedComponent.snapMouseCursorToCenter();
     }
 }