Module ...

Basic mousepress handler The engine calls receiveMouse when a mouse is clicked

Functions

_M:delegate (button, mx, my, xrel, yrel, bx, by, event, name, extra) 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, force_name, extra) Called when a mouse is pressed
_M:registerZone (x, y, w, h, fct, mode, name, allow_out_events) 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, name, extra)
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:
  • name:
  • extra:
_M:receiveMouse (button, x, y, isup, force_name, extra)
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
  • force_name: if not nil only the zone with this name may trigger
  • extra:
_M:registerZone (x, y, w, h, fct, mode, name, allow_out_events)
Registers a click zone that when clicked will call the object's "onClick" method

Parameters

  • x:
  • y:
  • w:
  • h:
  • fct:
  • mode:
  • name:
  • allow_out_events:
_M:setCurrent ()
Setups as the current game keyhandler

Valid XHTML 1.0!