OpenTK.Input.MouseDevice.this C# (CSharp) Méthode

this() public méthode

Gets a System.Boolean indicating the state of the specified MouseButton.
public this ( MouseButton button ) : bool
button MouseButton The MouseButton to check.
Résultat bool
        public bool this[MouseButton button]
        {
            get
            {
                return button_state[(int)button];
            }
            internal set
            {
                bool previous_state = button_state[(int)button];
                button_state[(int)button] = value;
                button_args.X = pos.X;
                button_args.Y = pos.Y;
                button_args.Button = button;
                button_args.IsPressed = value;
                if (value && !previous_state)
                    ButtonDown(this, button_args);
                else if (!value && previous_state)
                    ButtonUp(this, button_args);
            }
        }