FreeJ scripting

Class JoystickController

Object
   |
   +--Controller
         |
         +--JoystickController

class JoystickController
extends Controller


The Joystick Controller holds callbacks to javascript. Assign functions to the callback to handle events:

Example: jc = new JoystickController(); register_controller(jc); jc.axismotion = function (which, axis, value) { echo("joystick axis event: " + which + ", " + axis + ", " + value); // do something return true; }

Defined in Controller.js


Constructor Summary
JoystickController()
            The JoystickController constructor creates a joystick controller
 
Method Summary
 bool axismotion(<int> which, <int> axis, <int> value)
           Callback on moving a joystick axis
 bool ballmotion(<int> which, <int> ball, <int> xrel, <int> yrel)
           Callback on trackball motion event
 bool button(<int> which, <int> button, <int> state)
           Callback on button event
 bool hatmotion(<int> which, <int> hat, <int> value)
           Callback on joystick hat position change
 
Methods inherited from class Controller
activate, get_name
 

Constructor Detail

JoystickController

JoystickController()

Method Detail

axismotion

bool axismotion(<int> which, <int> axis, <int> value)

ballmotion

bool ballmotion(<int> which, <int> ball, <int> xrel, <int> yrel)

button

bool button(<int> which, <int> button, <int> state)

hatmotion

bool hatmotion(<int> which, <int> hat, <int> value)

FreeJ scripting

| FreeJ scripting documentation is Copyleft (C) 2000 - 2007 dyne.org foundation. Verbatim copying and distribution of this entire page is permitted in any medium, provided this notice is preserved.
Send inquiries & questions to dyne.org's hackers.
Documentation generated by JSDoc on Thu May 29 20:56:52 2008