Module ...
Basic mousepress handler The engine calls receiveMouse when a mouse is clicked
Functions
_M:delegate (button, mx, my, xrel, yrel, bx, by, event) | Delegate an event from an other mouse handler if self.delegate_offset_x and self.delegate_offset_y are set hey will be used to change the actual coordinates |
_M:receiveMouse (button, x, y, isup) | Called when a mouse is pressed |
_M:registerZone (x, y, w, h, fct, mode, name) | Registers a click zone that when clicked will call the object's "onClick" method |
_M:setCurrent () | Setups as the current game keyhandler |
Functions
- _M:delegate (button, mx, my, xrel, yrel, bx, by, event)
-
Delegate an event from an other mouse handler if self.delegate_offset_x and self.delegate_offset_y are set hey will be used to change the actual coordinates
Parameters
- button:
- mx:
- my:
- xrel:
- yrel:
- bx:
- by:
- event:
- _M:receiveMouse (button, x, y, isup)
-
Called when a mouse is pressed
Parameters
- button:
- x: coordinate of the click
- y: coordinate of the click
- isup: true if the key was released, false if pressed
- _M:registerZone (x, y, w, h, fct, mode, name)
-
Registers a click zone that when clicked will call the object's "onClick" method
Parameters
- x:
- y:
- w:
- h:
- fct:
- mode:
- name:
- _M:setCurrent ()
- Setups as the current game keyhandler