yage.system.input
Authors:
Eric Poggel, Joe Pusdesris (deformative0@gmail.com)
License:
LGPL v3
- abstract class
Input
;
- A static class to handle keyboard, mouse, and eventually joystick input.
This polls SDL for input and passes it to the current surface.
TODO:
Ditch SDL! SDL requires input processing to be in the same thread as the renderer.
- enum
ModifierKey
;
- This is a mirror of SDLMod (SDL's modifier key struct)
-
NONE
LSHIFT
RSHIFT
LCTRL
RCTRL
LALT
RALT
LMETA
RMETA
NUM
CAPS
MODE
RESERVED
CTRL
SHIFT
ALT
META
- Allowed values.
- enum
MouseButton
;
-
LEFT
CENTER
RIGHT
WHEEL_UP
WHEEL_DOWN
FOUR
FIVE
SIX
SEVEN
EIGHT
- Allowed values.
- static int
KEY_DELAY
;
- milliseconds before repeating a call to keyPress after holding a key down.
- static int
KEY_REPEAT
;
- milliseconds before subsequent calls to keyPress after KEY_DELAY occurs.
- struct
Mouse
;
- Position of the mouse and state of each button.
- Vec2i
position
;
bool
left
;
bool
center
;
bool
right
;
bool
four
;
bool
five
;
bool
six
;
bool
seven
;
bool
eight
;
- char[]
toString
();
- static Mouse
mouse
;
- Stores the current state of the
mouse
.
- static void
processAndSendTo
(Surface surface);
- Process input, handle window resize and close events, and send the remaining events to surface,
calling the surfaces's keyDown, keyUp, mouseDown, MouseUp, and mouseOver functions as appropriate.
|