Encode Mouse Button returns a byte representing a mouse button.
The button is a bitmask of the following leftmost values:
The first two bits are the button number:
0 = left button, wheel up, or button no. 8 aka (backwards)
1 = middle button, wheel down, or button no. 9 aka (forwards)
2 = right button, wheel left, or button no. 10
3 = release event, wheel right, or button no. 11
The third bit indicates whether the shift key was pressed.
The fourth bit indicates the alt key was pressed.
The fifth bit indicates the control key was pressed.
The sixth bit indicates motion events. Combined with button number 3, i.e.
release event, it represents a drag event.
The seventh bit indicates a wheel event.
The eighth bit indicates additional buttons.
If button is MouseButton.None, and motion is false, this returns a release event.
If button is undefined, this function returns 0xff.
Encode Mouse Button returns a byte representing a mouse button. The button is a bitmask of the following leftmost values:
The first two bits are the button number: 0 = left button, wheel up, or button no. 8 aka (backwards) 1 = middle button, wheel down, or button no. 9 aka (forwards) 2 = right button, wheel left, or button no. 10 3 = release event, wheel right, or button no. 11
The third bit indicates whether the shift key was pressed.
The fourth bit indicates the alt key was pressed.
The fifth bit indicates the control key was pressed.
The sixth bit indicates motion events. Combined with button number 3, i.e. release event, it represents a drag event.
The seventh bit indicates a wheel event.
The eighth bit indicates additional buttons.
If button is MouseButton.None, and motion is false, this returns a release event. If button is undefined, this function returns 0xff.