Difference between revisions of "GetMouseButtonPress"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Quetzilla
imported>Quetzilla
Line 9: Line 9:
==Notes==
==Notes==
* Index starts at 0 for the first button being pressed, 1 for the second, etc.
* Index starts at 0 for the first button being pressed, 1 for the second, etc.
* Scancodes for mouse buttons are the numbers 256 to 263, and also 264 and 265 to check for mouse wheel movement.
* This function will return the scancode of a mouse button for the whole period it is held down, and not just the first frame.
* This function will return the scancode of a mouse button for the whole period it is held down, and not just the first frame.
* If no mouse button are being held down, or if the id you give is greater than the number of mouse buttons being held down, this function will return 65535.
* If no mouse button are being held down, or if the id you give is greater than the number of mouse buttons being held down, this function will return 65535.
* This function doesn't return a value while a [[MessageBox]] is being displayed, presumably because input is switched over to the MessageBox.
* This function doesn't return a value while a [[MessageBox]] is being displayed, presumably because input is switched over to the MessageBox.
{{DirectX Scancodes}}


==See Also==
==See Also==

Revision as of 19:43, 29 May 2008

A command for Oblivion Script Extender

Syntax:

(dxScanCode:long) GetMouseButtonPress whichIndex:long

Returns the dx scancode of the mouse button being pressed. If more than one mouse button is pressed, use whichIndex to choose which code to return.

Notes

  • Index starts at 0 for the first button being pressed, 1 for the second, etc.
  • Scancodes for mouse buttons are the numbers 256 to 263, and also 264 and 265 to check for mouse wheel movement.
  • This function will return the scancode of a mouse button for the whole period it is held down, and not just the first frame.
  • If no mouse button are being held down, or if the id you give is greater than the number of mouse buttons being held down, this function will return 65535.
  • This function doesn't return a value while a MessageBox is being displayed, presumably because input is switched over to the MessageBox.

See Also