"L. Spiro Engine"
Classes | Public Member Functions | Protected Types | Protected Attributes | Friends

lse::CKeyboard Class Reference

Manages keyboard input. More...

#include <LSEKeyboard.h>

List of all members.

Classes

struct  LSE_KEY_INFO

Public Member Functions

LSBOOL LSE_CALL KeyIsDown (LSUINT32 _ui32Key) const
LSBOOL LSE_CALL KeyJustPressed (LSUINT32 _ui32Key) const
LSBOOL LSE_CALL KeyJustReleased (LSUINT32 _ui32Key) const

Protected Types

typedef struct
lse::CKeyboard::LSE_KEY_INFO
LPLSE_KEY_INFO
typedef struct
lse::CKeyboard::LSE_KEY_INFO 
LPCLSE_KEY_INFO

Protected Attributes

LSE_KEY_INFO m_kiKeys [CKeyboardBuffer::LSE_T_TOTALKEYS]
LSE_KEY_INFO m_kiLastKeys [CKeyboardBuffer::LSE_T_TOTALKEYS]
LSUINT64 m_ui64CurTime

Friends

class CKeyboardBuffer

Detailed Description

Manages keyboard input.

Class CKeyboard Description: Keyboard input updated once per frame. Requires a helper CKeyboardBuffer object to gather input notifications between frames. Input data is buffered in the CKeyboardBuffer object and passed off to the keyboard.

Key information includes if the key is down, just released, just pressed, and how long it has been down.


Member Typedef Documentation

A key.


Member Function Documentation

LSBOOL LSE_CALL lse::CKeyboard::KeyIsDown ( LSUINT32  _ui32Key) const

Determine if the given key is being held.

Parameters:
_ui32KeyThe key to test for being held.
Returns:
Returns true if the given key is valid and is being held as of the last time the keyboard was updated.
LSBOOL LSE_CALL lse::CKeyboard::KeyJustPressed ( LSUINT32  _ui32Key) const

Determine if a key was just pressed since the last time the keyboard was updated.

Parameters:
_ui32KeyThe key to test for being just pressed.
Returns:
Returns true if the given key is valid and was just pressed as of the last time the keyboard was updated.
LSBOOL LSE_CALL lse::CKeyboard::KeyJustReleased ( LSUINT32  _ui32Key) const

Determine if a key was just released since the last time the keyboard was updated.

Parameters:
_ui32KeyThe key to test for being just released.
Returns:
Returns true if the given key is valid and was just released as of the last time the keyboard was updated.

Member Data Documentation

LSE_KEY_INFO lse::CKeyboard::m_kiKeys[CKeyboardBuffer::LSE_T_TOTALKEYS] [protected]

Key information.

LSE_KEY_INFO lse::CKeyboard::m_kiLastKeys[CKeyboardBuffer::LSE_T_TOTALKEYS] [protected]

Copy of the keys from last frame.

LSUINT64 lse::CKeyboard::m_ui64CurTime [protected]

The current time, by the CKeyboardBuffer clock.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator