Table of Contents

Using Mouse Inputs

Code

orxSTATUS orxFASTCALL Init()
{
  orxClock_Register(orxClock_Get(orxCLOCK_KZ_CORE), Update, orxNULL, orxMODULE_ID_MAIN, orxCLOCK_PRIORITY_NORMAL);
...
void orxFASTCALL Update(const orxCLOCK_INFO *_pstClockInfo, void *_pContext)
{
	if (orxInput_IsActive("MouseWheelUp") == orxTRUE){
		orxLOG("MouseWheelUp");
	}
 
	if (orxInput_IsActive("MouseWheelDown") == orxTRUE){
		orxLOG("MouseWheelDown");
	}
 
	if (orxInput_IsActive("LeftClick") == orxTRUE){
		orxLOG("LeftClick");
	}
 
	if (orxInput_IsActive("MiddleClick") == orxTRUE){
		orxLOG("MiddleClick");
	}
}
...

Config

[KeysForInput]
KEY_ESCAPE       = Quit
MOUSE_LEFT	 = LeftClick
MOUSE_MIDDLE	 = MiddleClick
MOUSE_WHEEL_UP	 = MouseWheelUp
MOUSE_WHEEL_DOWN = MouseWheelDown