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().DecreaseValue; menuFunc(index, ammount); }
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); }