|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jmex.editors.swing.controls.ControlFieldListener
public class ControlFieldListener
| Constructor Summary | |
|---|---|
ControlFieldListener(GameControlEditor editor)
|
|
| Method Summary | |
|---|---|
void |
onAxis(Joystick controller,
int axis,
float axisValue)
Invoked when an axis has changed it's value. |
void |
onButton(int button,
boolean pressed,
int x,
int y)
Called in KeyInput.update() whenever a mouse button is pressed or released. |
void |
onButton(Joystick controller,
int button,
boolean pressed)
Invoked when a button was pressed or released. |
void |
onKey(char character,
int keyCode,
boolean pressed)
Called in KeyInput.update() whenever a key is pressed or released. |
void |
onMove(int xDelta,
int yDelta,
int newX,
int newY)
Called in KeyInput.update() whenever the mouse is moved. |
void |
onWheel(int wheelDelta,
int x,
int y)
Called in KeyInput.update() whenever the mouse wheel is rotated. |
void |
prompt(ControlField field)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ControlFieldListener(GameControlEditor editor)
| Method Detail |
|---|
public void prompt(ControlField field)
public void onKey(char character,
int keyCode,
boolean pressed)
KeyInputListenerKeyInput.update() whenever a key is pressed or released.
onKey in interface KeyInputListenercharacter - character associated with pressed key, 0 if not applicable (e.g. if key released)keyCode - key code of the pressed/released keypressed - true if key was pressed, false if released
public void onButton(int button,
boolean pressed,
int x,
int y)
MouseInputListenerKeyInput.update() whenever a mouse button is pressed or released.
onButton in interface MouseInputListenerbutton - index of the mouse button that was pressed/releasedpressed - true if button was pressed, false if releasedx - x position of the mouse while button was pressed/releasedy - y position of the mouse while button was pressed/released
public void onMove(int xDelta,
int yDelta,
int newX,
int newY)
MouseInputListenerKeyInput.update() whenever the mouse is moved.
onMove in interface MouseInputListenerxDelta - delta of the x coordinate since the last mouse movement eventyDelta - delta of the y coordinate since the last mouse movement eventnewX - x position of the mouse after the mouse was movednewY - y position of the mouse after the mouse was moved
public void onWheel(int wheelDelta,
int x,
int y)
MouseInputListenerKeyInput.update() whenever the mouse wheel is rotated.
onWheel in interface MouseInputListenerwheelDelta - steps the wheel was rotatedx - x position of the mouse while wheel was rotatedy - y position of the mouse while wheel was rotated
public void onAxis(Joystick controller,
int axis,
float axisValue)
JoystickInputListener
onAxis in interface JoystickInputListenercontroller - joystick the axis belongs toaxis - index of the axisaxisValue - new value of the axis
public void onButton(Joystick controller,
int button,
boolean pressed)
JoystickInputListener
onButton in interface JoystickInputListenercontroller - joystick the button belongs tobutton - index of the buttonpressed - true if button was pressed, false if released
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||