Site Tools
Sidebar
User's Manual
t2:mouse_status
mouse_status
mouse_status — Status of a mouse input
Description
int32 mouse_status(int8 ident);
Get the current status of the mouse input specified by ident.
The mouse_status() returns the current status any mouse input without the need of mapping the mouse input to a controller I/O. |
Parameters
- ident: Identifier of a mouse input. Refer to mouse.gph for the mouse identifiers definitions.
Return Value
Returns an int32 value that represents the current status of the mouse input specified by ident.
Examples
Example #1 mouse_status() example
#include <mouse.gph> main { if(mouse_status(MBUTTON_1)) { set_val(BUTTON_5, 100.0); } }
Example #2 mouse_status() example
#include <mouse.gph> main { int32 mstatus; if (mouse_status(MREPORT_UPDATED)) { if (mstatus=mouse_status(MOUSE_WHEEL)) { if (mstatus== 1) printf("Mouse Wheel Forward"); if (mstatus==-1) printf("Mouse Wheel Backward"); } } }
See Also
t2/mouse_status.txt · Last modified: 2019/01/25 13:56 by scachi