Example #1
0
 public override void ClickEvent()
 {
     int ammount = 1;
     if(Managers.User.kState.IsKeyDown(Keys.LeftShift) || Managers.User.kState.IsKeyDown(Keys.RightShift))
     {
         ammount = 5;
     }
     if(menuFunc == null)
         menuFunc = Managers.Executive.menuStack.Peek().IncreaseValue;
     menuFunc(index, ammount);
 }
Example #2
0
        private void CheckMouse()
        {
            var mousePosition = System.Windows.Forms.Cursor.Position;
            int deltaX        = mousePosition.X - m_initialMousePosition.X;

            if (deltaX < 0)
            {
                DecreaseValue?.Invoke(this);
            }
            else if (deltaX > 0)
            {
                IncreaseValue?.Invoke(this);
            }

            SetCursorPos(m_initialMousePosition.X, m_initialMousePosition.Y);
        }