Chesto 0.9
A declarative and element-based library for creating GUIs on homebrew'd consoles
|
Public Member Functions | |
bool | held (int buttons) |
whether or not a button is pressed during this cycle More... | |
bool | pressed (int buttons) |
bool | released (int buttons) |
bool | touchIn (int x, int width, int y, int height) |
whether or not a touch is detected within the specified rect in this cycle More... | |
bool | processSDLEvents () |
update which buttons are pressed More... | |
bool | update () |
bool | isTouchDown () |
bool | isTouchUp () |
bool | isTouchDrag () |
bool | isTouch () |
bool | isScroll () |
bool | isKeyDown () |
bool | isKeyUp () |
bool | processDirectionalButtons () |
int | directionForKeycode () |
void | toggleHeldButtons () |
void | processJoystickHotplugging (SDL_Event *event) |
joystick device events processing More... | |
Static Public Member Functions | |
static GamepadInfo & | getLastGamepadInfo () |
Public Attributes | |
bool | allowTouch = true |
bool | isScrolling = false |
CST_Keycode | keyCode = -1 |
CST_Keymod | mod = -1 |
SDL_Event | event |
bool | held_directions [4] = { false, false, false, false } |
Uint32 | held_type |
int | rapidFireRate = 12 |
int | curFrame = 0 |
std::function< void()> | quitaction = NULL |
float | wheelScroll = 0 |
int | yPos = 0 |
int | xPos = 0 |
bool | noop = false |
Uint32 | type |
Static Public Attributes | |
static bool | bypassKeyEvents = false |
static std::string | lastGamepadKey = defaultKeyName |
Definition at line 79 of file InputEvents.hpp.
InputEvents::InputEvents | ( | ) |
Definition at line 67 of file InputEvents.cpp.
int InputEvents::directionForKeycode | ( | ) |
Definition at line 241 of file InputEvents.cpp.
|
static |
Definition at line 366 of file InputEvents.cpp.
bool InputEvents::held | ( | int | buttons | ) |
whether or not a button is pressed during this cycle
Definition at line 272 of file InputEvents.cpp.
Referenced by Button::process(), and EKeyboard::process().
bool InputEvents::isKeyDown | ( | ) |
Definition at line 333 of file InputEvents.cpp.
bool InputEvents::isKeyUp | ( | ) |
Definition at line 338 of file InputEvents.cpp.
bool InputEvents::isScroll | ( | ) |
Definition at line 328 of file InputEvents.cpp.
bool InputEvents::isTouch | ( | ) |
Definition at line 323 of file InputEvents.cpp.
bool InputEvents::isTouchDown | ( | ) |
Definition at line 308 of file InputEvents.cpp.
bool InputEvents::isTouchDrag | ( | ) |
Definition at line 313 of file InputEvents.cpp.
bool InputEvents::isTouchUp | ( | ) |
Definition at line 318 of file InputEvents.cpp.
bool InputEvents::pressed | ( | int | buttons | ) |
Definition at line 293 of file InputEvents.cpp.
bool InputEvents::processDirectionalButtons | ( | ) |
Definition at line 214 of file InputEvents.cpp.
void InputEvents::processJoystickHotplugging | ( | SDL_Event * | event | ) |
joystick device events processing
Definition at line 343 of file InputEvents.cpp.
Referenced by processSDLEvents().
bool InputEvents::processSDLEvents | ( | ) |
update which buttons are pressed
Definition at line 75 of file InputEvents.cpp.
References Element::needsRedraw, and processJoystickHotplugging().
bool InputEvents::released | ( | int | buttons | ) |
Definition at line 298 of file InputEvents.cpp.
void InputEvents::toggleHeldButtons | ( | ) |
Definition at line 184 of file InputEvents.cpp.
bool InputEvents::touchIn | ( | int | x, |
int | width, | ||
int | y, | ||
int | height | ||
) |
whether or not a touch is detected within the specified rect in this cycle
Definition at line 303 of file InputEvents.cpp.
Referenced by EKeyboard::process(), and Element::process().
bool InputEvents::update | ( | ) |
Definition at line 174 of file InputEvents.cpp.
bool InputEvents::allowTouch = true |
Definition at line 96 of file InputEvents.hpp.
|
static |
Definition at line 127 of file InputEvents.hpp.
int InputEvents::curFrame = 0 |
Definition at line 125 of file InputEvents.hpp.
SDL_Event InputEvents::event |
Definition at line 119 of file InputEvents.hpp.
bool InputEvents::held_directions[4] = { false, false, false, false } |
Definition at line 121 of file InputEvents.hpp.
Uint32 InputEvents::held_type |
Definition at line 122 of file InputEvents.hpp.
bool InputEvents::isScrolling = false |
Definition at line 97 of file InputEvents.hpp.
CST_Keycode InputEvents::keyCode = -1 |
Definition at line 117 of file InputEvents.hpp.
|
static |
Definition at line 129 of file InputEvents.hpp.
CST_Keymod InputEvents::mod = -1 |
Definition at line 118 of file InputEvents.hpp.
bool InputEvents::noop = false |
Definition at line 137 of file InputEvents.hpp.
std::function<void()> InputEvents::quitaction = NULL |
Definition at line 131 of file InputEvents.hpp.
int InputEvents::rapidFireRate = 12 |
Definition at line 124 of file InputEvents.hpp.
Uint32 InputEvents::type |
Definition at line 139 of file InputEvents.hpp.
float InputEvents::wheelScroll = 0 |
Definition at line 133 of file InputEvents.hpp.
int InputEvents::xPos = 0 |
Definition at line 136 of file InputEvents.hpp.
int InputEvents::yPos = 0 |
Definition at line 135 of file InputEvents.hpp.