dsfml.window.input
class
Input
;
Input
handles real-time input from keyboard and mouse. Use it instead of events to handle continuous moves and more game-friendly inputs
bool
isKeyDown
(KeyCode
key
);
Get the state of a
key
Params:
KeyCode
key
Key to check
Returns:
True if
key
is down,
false
if
key
is up
bool
isMouseButtonDown
(MouseButtons
button
);
Get the state of a mouse
button
Params:
MouseButtons
button
Button to check
Returns:
True if
button
is down,
false
if
button
is up
bool
isJoystickButtonDown
(uint
joyId
, uint
button
);
Get the state of a joystick
button
Params:
uint
joyId
Identifier of the joystick to check (0 or 1)
uint
button
Button to check
Returns:
True if
button
is down,
false
if
button
is up
uint
getMouseY
();
Get the mouse Y position
Returns:
Current mouse top position, relative to owner window
float
getJoystickAxis
(uint
joyId
, JoyAxis
axis
);
Get a joystick
axis
position
Params:
uint
joyId
Identifier of the joystick to check (0 or 1)
JoyAxis
axis
Axis to get
Returns:
Current
axis
position, in the range [-100, 100] (except for POV, which is [0, 360])
Page generated by
Ddoc
.