cgv
|
gamepad key events use the key codes defined in gamepad::GamepadKeys More...
#include <gamepad_server.h>
Public Member Functions | |
gamepad_key_event (void *_device_handle, const gamepad::gamepad_state &_state, unsigned short _key=0, KeyAction _action=KA_PRESS, unsigned char _char=0, double _time=0) | |
construct a key event from its textual description | |
void * | get_device_handle () const |
return the device id, by default returns 0 | |
const gamepad::gamepad_state & | get_state () const |
access to current gamepad state | |
void | stream_out (std::ostream &os) const |
write to stream | |
void | stream_in (std::istream &is) |
read from stream | |
unsigned short | get_key () const |
return the key being a capital letter, digit or a value from the Keys enum | |
void | set_key (unsigned short _key) |
set the key | |
KeyAction | get_action () const |
return the key event action | |
void | set_action (KeyAction _action) |
set the key event action | |
unsigned char | get_char () const |
return the key as a character | |
void | set_char (unsigned char _char) |
set the alpha numeric character | |
virtual void * | get_device_id () const |
return the device id, by default returns 0 | |
void | set_kind (unsigned char _kind) |
set the kind of the event | |
unsigned | get_kind () const |
return, what kind of event this is, typically a value from the EventId enum | |
void | set_flags (unsigned char _flags) |
set the event flags More... | |
unsigned | get_flags () const |
return the event flags | |
void | set_modifiers (unsigned char _modifiers) |
set the modifiers | |
unsigned char | get_modifiers () const |
return the active modifiers as values from EventModifier combined with a logical or-operation | |
void | set_toggle_keys (unsigned char _toggle_keys) |
set the state of the toggle keys | |
unsigned char | get_toggle_keys () const |
return the state of the toggle keys as values from EventToggleKeys combined with a logical or-operation | |
void | set_time (const double &_time) |
set the time of the event | |
double | get_time () const |
return the time of the event in seconds | |
Protected Attributes | |
void * | device_handle |
store id of gamepad | |
const gamepad::gamepad_state & | state |
public access to game state allows skipping of library dependency | |
unsigned short | key |
store the pressed key | |
unsigned char | action |
store whether | |
unsigned char | character |
store the corresponding ascii character | |
unsigned char | kind |
store which kind of event we have | |
unsigned char | flags |
store event flags | |
unsigned char | modifiers |
store the active modifiers | |
unsigned char | toggle_keys |
store the active toggle keys | |
double | time |
store the time of the event in seconds | |
gamepad key events use the key codes defined in gamepad::GamepadKeys
|
inherited |
set the event flags
return the set the event flags