KeypadManager Class Reference
#include <KeypadManager.h>

# Public Member Functions | |
void | print (int32 x, int32 y) |
void | reset () |
Reset the manager's state. | |
void | readUserInput (bool waitForStableReading) |
# Static Public Member Functions | |
static void | interruptHandler () |
Interrupt handler for keypad's interrupts. | |
static void | enable () |
Enable user input. | |
static void | disable () |
Disable user input. | |
static int32 | isEnabled () |
static void | enableDummyKey () |
Enable the dummy key to force user input processing. | |
static void | disableDummyKey () |
Disable the dummy key to not enforce user input processing. | |
static void | registerInput (uint16 inputToRegister) |
static UserInput | getUserInput () |
static long | getAccumulatedUserInput () |
# Protected Attributes | |
long | accumulatedUserInput |
Holds the mathematical sum of all user's presses. | |
UserInput | userInput |
Struct that holds the user's input during the last game frame. | |
UserInput | userInputToRegister |
Flags to select which inputs to register and which to ignore. | |
bool | enabled |
Flag to enable/disable the capture of user input. | |
bool | reseted |
# Additional Inherited Members | |
![]() | |
void | constructor () |
Class' constructor. | |
void | destructor () |
Class' destructor. | |
void | addEventListener (ListenerObject listener, uint16 eventCode) |
void | removeEventListener (ListenerObject listener, uint16 eventCode) |
void | removeEventListeners (uint16 eventCode) |
void | removeAllEventListeners () |
Remove all listener objects. | |
bool | hasActiveEventListeners () |
void | fireEvent (uint16 eventCode) |
void | sendMessageTo (ListenerObject receiver, uint32 message, uint32 delay, uint32 randomDelay) |
void | sendMessageToSelf (uint32 message, uint32 delay, uint32 randomDelay) |
void | discardAllMessages () |
Discard all messages, both to be sent and to be received. | |
void | discardMessages (uint32 message) |
virtual bool | onEvent (ListenerObject eventFirer, uint16 eventCode) |
virtual bool | handleMessage (Telegram telegram) |
![]() | |
VirtualList | events |
List of registered events. | |
int8 | eventFirings |
Counter that keeps track of the number of fired events to prevent race conditions in nested firings. |
# Detailed Description
Class KeypadManager
Inherits from ListenerObject
Manages keypad inputs.
Definition at line 104 of file KeypadManager.h.
# Member Function Documentation
# disable()
|
static |
Disable user input.
Definition at line 54 of file KeypadManager.c.
# disableDummyKey()
|
static |
Disable the dummy key to not enforce user input processing.
Definition at line 81 of file KeypadManager.c.
# enable()
|
static |
Enable user input.
Definition at line 42 of file KeypadManager.c.
# enableDummyKey()
|
static |
Enable the dummy key to force user input processing.
Definition at line 72 of file KeypadManager.c.
# getAccumulatedUserInput()
|
static |
Retrieve the accumulated sum of user inputs since the start of the program.
- Returns
- The mathematical sum of all user's presses.
Definition at line 113 of file KeypadManager.c.
# getUserInput()
|
static |
Retrieve the user input during the last game frame
- Returns
- User input struct with the key presses of the last game frame
Definition at line 104 of file KeypadManager.c.
# interruptHandler()
|
static |
Interrupt handler for keypad's interrupts.
Definition at line 31 of file KeypadManager.c.
# isEnabled()
|
static |
Check if user input is enabled.
- Returns
- True if user input is enabled
Definition at line 63 of file KeypadManager.c.
# print()
Print the last reads of user input.
- Parameters
-
x Screen x coordinate where to print y Screen y coordinate where to print
# readUserInput()
secure void KeypadManager::readUserInput | ( | bool | waitForStableReading | ) |
Reat the user input during the last game frame
- Parameters
-
waitForStableReading If true, wait for reading to be stable (__S_STAT)
Definition at line 173 of file KeypadManager.c.
# registerInput()
|
static |
Register the user input according to the provided flags.
- Parameters
-
inputToRegister Flags to select which inputs to register and which to ignore
Definition at line 90 of file KeypadManager.c.
# reset()
secure void KeypadManager::reset | ( | ) |
Reset the manager's state.
Definition at line 159 of file KeypadManager.c.
# Member Data Documentation
# accumulatedUserInput
|
protected |
Holds the mathematical sum of all user's presses.
Definition at line 109 of file KeypadManager.h.
# enabled
|
protected |
Flag to enable/disable the capture of user input.
Definition at line 118 of file KeypadManager.h.
# reseted
|
protected |
Flag to prevent pressed and released keys from being raised when holding buttons while changing game states
Definition at line 122 of file KeypadManager.h.
# userInput
|
protected |
Struct that holds the user's input during the last game frame.
Definition at line 112 of file KeypadManager.h.
# userInputToRegister
|
protected |
Flags to select which inputs to register and which to ignore.
Definition at line 115 of file KeypadManager.h.
The documentation for this class was generated from the following files:
- VUEngine-Core/source/Hardware/KeypadManager.h
- VUEngine-Core/source/Hardware/KeypadManager.c