OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
GameKeyboardController Class Reference

#include <GameKeyboardController.h>

Inheritance diagram for GameKeyboardController:
Io::IKeyboardController PlatformEventFilter

Public Member Functions

 GameKeyboardController ()
 
virtual bool ConsumeKeyPress (PlatformKey key) override
 
virtual bool IsKeyDown (PlatformKey key) const override
 
void reset ()
 
virtual bool ConsumeKeyPress (PlatformKey key)=0
 
virtual bool IsKeyDown (PlatformKey key) const =0
 
- Public Member Functions inherited from PlatformEventFilter
 PlatformEventFilter (std::initializer_list< PlatformEventType > eventTypes)
 
 PlatformEventFilter (PlatformEventWildcard eventTypes)
 
virtual bool event (const PlatformEvent *event)
 
const std::vector< PlatformEventTypeeventTypes () const
 

Private Member Functions

virtual bool keyPressEvent (const PlatformKeyEvent *event) override
 
virtual bool keyReleaseEvent (const PlatformKeyEvent *event) override
 

Private Attributes

IndexedArray< bool, PlatformKey::KEY_FIRST, PlatformKey::KEY_LAST > isKeyDown_ = {{}}
 
IndexedArray< bool, PlatformKey::KEY_FIRST, PlatformKey::KEY_LAST > isKeyDownReportPending_ = {{}}
 

Additional Inherited Members

- Protected Member Functions inherited from PlatformEventFilter
virtual bool keyPressEvent (const PlatformKeyEvent *event)
 
virtual bool keyReleaseEvent (const PlatformKeyEvent *event)
 
virtual bool mouseMoveEvent (const PlatformMouseEvent *event)
 
virtual bool mousePressEvent (const PlatformMouseEvent *event)
 
virtual bool mouseReleaseEvent (const PlatformMouseEvent *event)
 
virtual bool wheelEvent (const PlatformWheelEvent *event)
 
virtual bool moveEvent (const PlatformMoveEvent *event)
 
virtual bool resizeEvent (const PlatformResizeEvent *event)
 
virtual bool activationEvent (const PlatformWindowEvent *event)
 
virtual bool closeEvent (const PlatformWindowEvent *event)
 
virtual bool gamepadConnectionEvent (const PlatformGamepadEvent *event)
 
virtual bool gamepadKeyPressEvent (const PlatformGamepadKeyEvent *event)
 
virtual bool gamepadKeyReleaseEvent (const PlatformGamepadKeyEvent *event)
 
virtual bool gamepadAxisEvent (const PlatformGamepadAxisEvent *event)
 
virtual bool nativeEvent (const PlatformNativeEvent *event)
 
virtual bool textInputEvent (const PlatformTextInputEvent *event)
 

Constructor & Destructor Documentation

◆ GameKeyboardController()

GameKeyboardController::GameKeyboardController ( )

Member Function Documentation

◆ ConsumeKeyPress()

bool GameKeyboardController::ConsumeKeyPress ( PlatformKey  key)
overridevirtual

◆ IsKeyDown()

bool GameKeyboardController::IsKeyDown ( PlatformKey  key) const
overridevirtual

◆ keyPressEvent()

bool GameKeyboardController::keyPressEvent ( const PlatformKeyEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ keyReleaseEvent()

bool GameKeyboardController::keyReleaseEvent ( const PlatformKeyEvent event)
overrideprivatevirtual

Reimplemented from PlatformEventFilter.

◆ reset()

void GameKeyboardController::reset ( )

Member Data Documentation

◆ isKeyDown_

IndexedArray<bool, PlatformKey::KEY_FIRST, PlatformKey::KEY_LAST> GameKeyboardController::isKeyDown_ = {{}}
private

Whether the key is currently held down.

◆ isKeyDownReportPending_

IndexedArray<bool, PlatformKey::KEY_FIRST, PlatformKey::KEY_LAST> GameKeyboardController::isKeyDownReportPending_ = {{}}
private

Whether there was a key down event that hasn't yet been consumed with a call to ConsumeKeyPress. Note that the key might already be released at this point, e.g. if press & release events were received one after another.


The documentation for this class was generated from the following files: