Exemple #1
0
 public override void receiveLeftClick(int x, int y, bool playSound = true)
 {
     base.receiveLeftClick(x, y, true);
     if (UpButton.containsPoint(x, y) && _currentRow > 0)
     {
         Game1.playSound("coin");
         _currentRow--;
         UpButton.scale = UpButton.baseScale;
     }
     if (DownButton.containsPoint(x, y) && _currentRow < _maxRow)
     {
         Game1.playSound("coin");
         _currentRow++;
         DownButton.scale = DownButton.baseScale;
     }
     Refresh();
 }
Exemple #2
0
 public override void performHoverAction(int x, int y)
 {
     base.performHoverAction(x, y);
     UpButton.scale   = UpButton.containsPoint(x, y) ? Math.Min(UpButton.scale + 0.02f, UpButton.baseScale + 0.1f) : Math.Max(UpButton.scale - 0.02f, UpButton.baseScale);
     DownButton.scale = DownButton.containsPoint(x, y) ? Math.Min(DownButton.scale + 0.02f, DownButton.baseScale + 0.1f) : Math.Max(DownButton.scale - 0.02f, DownButton.baseScale);
 }