public DirectInputButtonEventArgs([NotNull] DirectInputButton button)
        {
            if (button == null)
            {
                throw new ArgumentNullException(nameof(button));
            }

            Provider  = button;
            IsPressed = button.Value;
        }
Example #2
0
        public DirectInputButton GetButton(int id)
        {
            DirectInputButton result;

            if (_buttons.TryGetValue(id, out result))
            {
                return(result);
            }
            result = new DirectInputButton(this, id);
            return(_buttons[id] = result);
        }