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