Sleeping Wombat GUI  0.100
swGUI
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sw::input::DirectInputModule Class Reference

Klasa obsługująca wejście użytkownika. More...

#include <DirectInputModule.h>

Inheritance diagram for sw::input::DirectInputModule:
sw::input::IInput

Public Member Functions

 DirectInputModule ()
 
virtual ~DirectInputModule ()
 
virtual bool Init (const InputInitInfo &initInfo) override
 Inicjalizuje cały moduł. Po wywołaniu tej funkcji moduł musi być gotowy do użytku w innym przypadku powinien zwrócić false. More...
 
virtual const std::vector< const KeyboardState * > & GetKeyboardStates () const override
 
virtual const std::vector< const MouseState * > & GetMouseStates () const override
 
virtual const std::vector< const JoystickState * > & GetJoystickStates () const override
 
virtual std::vector< KeyboardDeviceOPtr > & GetKeyboardDevice () override
 
virtual std::vector< MouseDeviceOPtr > & GetMouseDevice () override
 
virtual std::vector< JoystickDeviceOPtr > & GetJoystickDevice () override
 
virtual std::vector< const InputDeviceInfo * > GetDevicesInfo () const override
 
virtual void Update (float timeInterval) override
 
virtual bool UpdateDevices () override
 Funkcja na nowo sprawdza obecne w systemie urządzenia i aktualizuje wszystkie potrzebne dane. More...
 
- Public Member Functions inherited from sw::input::IInput
virtual ~IInput ()=0
 

Private Member Functions

void CleanDirectInput ()
 Zwalania zasoby DirectInputa. More...
 
void UpdateKeyboard (int idx)
 
void UpdateMouse (int idx)
 
void UpdateJoystick (int idx)
 

Private Attributes

HWND m_windowHandle
 
LPDIRECTINPUT8 m_directInput
 
LPDIRECTINPUTDEVICE8 m_keyboardInput
 
LPDIRECTINPUTDEVICE8 m_mouseInput
 
std::vector< const KeyboardState * > m_keyboardsStates
 Copy of device state in m_keyboards. More...
 
std::vector< const MouseState * > m_mousesStates
 Copy of device state in m_mouses. More...
 
std::vector< const JoystickState * > m_joysticksStates
 Copy of device state in m_joysticks. More...
 
std::vector< KeyboardDeviceOPtr > m_keyboards
 Only first element is in use now. More...
 
std::vector< MouseDeviceOPtr > m_mouses
 Only first element is in use now. More...
 
std::vector< JoystickDeviceOPtr > m_joysticks
 Only first element is in use now. More...
 

Detailed Description

Klasa obsługująca wejście użytkownika.

Używa interfejsu Direct Inputa.

Todo:

Zrobić obsługę wielu urządzeń tego samego typu i jousticka.

Pozbyć się includowania direct input z EngineCore.

Constructor & Destructor Documentation

sw::input::DirectInputModule::DirectInputModule ( )
explicit
sw::input::DirectInputModule::~DirectInputModule ( )
virtual

Member Function Documentation

void sw::input::DirectInputModule::CleanDirectInput ( )
private

Zwalania zasoby DirectInputa.

std::vector< const InputDeviceInfo * > sw::input::DirectInputModule::GetDevicesInfo ( ) const
overridevirtual

Implements sw::input::IInput.

std::vector< JoystickDeviceOPtr > & sw::input::DirectInputModule::GetJoystickDevice ( )
overridevirtual

Implements sw::input::IInput.

const std::vector< const JoystickState * > & sw::input::DirectInputModule::GetJoystickStates ( ) const
overridevirtual

Implements sw::input::IInput.

std::vector< KeyboardDeviceOPtr > & sw::input::DirectInputModule::GetKeyboardDevice ( )
overridevirtual

Implements sw::input::IInput.

const std::vector< const KeyboardState * > & sw::input::DirectInputModule::GetKeyboardStates ( ) const
overridevirtual

Implements sw::input::IInput.

std::vector< MouseDeviceOPtr > & sw::input::DirectInputModule::GetMouseDevice ( )
overridevirtual

Implements sw::input::IInput.

const std::vector< const MouseState * > & sw::input::DirectInputModule::GetMouseStates ( ) const
overridevirtual

Implements sw::input::IInput.

bool sw::input::DirectInputModule::Init ( const InputInitInfo initInfo)
overridevirtual

Inicjalizuje cały moduł. Po wywołaniu tej funkcji moduł musi być gotowy do użytku w innym przypadku powinien zwrócić false.

Implements sw::input::IInput.

void sw::input::DirectInputModule::Update ( float  timeInterval)
overridevirtual
Todo:
Repair

Implements sw::input::IInput.

bool sw::input::DirectInputModule::UpdateDevices ( )
overridevirtual

Funkcja na nowo sprawdza obecne w systemie urządzenia i aktualizuje wszystkie potrzebne dane.

Implements sw::input::IInput.

void sw::input::DirectInputModule::UpdateJoystick ( int  idx)
private
void sw::input::DirectInputModule::UpdateKeyboard ( int  idx)
private
Todo:
Repair
void sw::input::DirectInputModule::UpdateMouse ( int  idx)
private
Todo:
Repair

Member Data Documentation

LPDIRECTINPUT8 sw::input::DirectInputModule::m_directInput
private
std::vector< JoystickDeviceOPtr > sw::input::DirectInputModule::m_joysticks
private

Only first element is in use now.

std::vector< const JoystickState* > sw::input::DirectInputModule::m_joysticksStates
private

Copy of device state in m_joysticks.

LPDIRECTINPUTDEVICE8 sw::input::DirectInputModule::m_keyboardInput
private
Todo:
Pewnie to powienien być wektor.
std::vector< KeyboardDeviceOPtr > sw::input::DirectInputModule::m_keyboards
private

Only first element is in use now.

std::vector< const KeyboardState* > sw::input::DirectInputModule::m_keyboardsStates
private

Copy of device state in m_keyboards.

LPDIRECTINPUTDEVICE8 sw::input::DirectInputModule::m_mouseInput
private
Todo:
Pewnie to powienien być wektor.
std::vector< MouseDeviceOPtr > sw::input::DirectInputModule::m_mouses
private

Only first element is in use now.

std::vector< const MouseState* > sw::input::DirectInputModule::m_mousesStates
private

Copy of device state in m_mouses.

HWND sw::input::DirectInputModule::m_windowHandle
private

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