Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
RealInputHandler Class Referencefinal

#include <inputhandler.h>

+ Inheritance diagram for RealInputHandler:
+ Collaboration diagram for RealInputHandler:

Public Member Functions

 RealInputHandler (MyEventReceiver *receiver)
 
virtual ~RealInputHandler ()
 
virtual bool isKeyDown (GameKeyType k)
 
virtual bool wasKeyDown (GameKeyType k)
 
virtual bool wasKeyPressed (GameKeyType k)
 
virtual bool wasKeyReleased (GameKeyType k)
 
virtual float getJoystickSpeed ()
 
virtual float getJoystickDirection ()
 
virtual bool cancelPressed ()
 
virtual void clearWasKeyPressed ()
 
virtual void clearWasKeyReleased ()
 
virtual void listenForKey (const KeyPress &keyCode)
 
virtual void dontListenForKeys ()
 
virtual v2s32 getMousePos ()
 
virtual void setMousePos (s32 x, s32 y)
 
virtual s32 getMouseWheel ()
 
void clear ()
 
void releaseAllKeys ()
 
- Public Member Functions inherited from InputHandler
 InputHandler ()
 
virtual ~InputHandler ()=default
 
virtual bool isRandom () const
 
virtual void step (float dtime)
 

Private Attributes

MyEventReceiverm_receiver = nullptr
 
v2s32 m_mousepos
 

Additional Inherited Members

- Public Attributes inherited from InputHandler
JoystickController joystick
 
KeyCache keycache
 

Constructor & Destructor Documentation

◆ RealInputHandler()

RealInputHandler::RealInputHandler ( MyEventReceiver * receiver)
inline

◆ ~RealInputHandler()

virtual RealInputHandler::~RealInputHandler ( )
inlinevirtual

Member Function Documentation

◆ cancelPressed()

virtual bool RealInputHandler::cancelPressed ( )
inlinevirtual

Implements InputHandler.

References KeyType::ESC, and wasKeyDown().

+ Here is the call graph for this function:

◆ clear()

void RealInputHandler::clear ( )
inlinevirtual

Reimplemented from InputHandler.

References JoystickController::clear(), MyEventReceiver::clearInput(), InputHandler::joystick, and m_receiver.

+ Here is the call graph for this function:

◆ clearWasKeyPressed()

virtual void RealInputHandler::clearWasKeyPressed ( )
inlinevirtual

Reimplemented from InputHandler.

References MyEventReceiver::clearWasKeyPressed(), and m_receiver.

+ Here is the call graph for this function:

◆ clearWasKeyReleased()

virtual void RealInputHandler::clearWasKeyReleased ( )
inlinevirtual

Reimplemented from InputHandler.

References MyEventReceiver::clearWasKeyReleased(), and m_receiver.

+ Here is the call graph for this function:

◆ dontListenForKeys()

virtual void RealInputHandler::dontListenForKeys ( )
inlinevirtual

Reimplemented from InputHandler.

References MyEventReceiver::dontListenForKeys(), and m_receiver.

+ Here is the call graph for this function:

◆ getJoystickDirection()

float RealInputHandler::getJoystickDirection ( )
virtual

Implements InputHandler.

References g_touchcontrols, TouchControls::getJoystickDirection(), TouchControls::getJoystickSpeed(), JoystickController::getMovementDirection(), and InputHandler::joystick.

+ Here is the call graph for this function:

◆ getJoystickSpeed()

float RealInputHandler::getJoystickSpeed ( )
virtual

Implements InputHandler.

References g_touchcontrols, TouchControls::getJoystickSpeed(), JoystickController::getMovementSpeed(), and InputHandler::joystick.

+ Here is the call graph for this function:

◆ getMousePos()

v2s32 RealInputHandler::getMousePos ( )
virtual

Implements InputHandler.

References RenderingEngine::get_raw_device(), and m_mousepos.

+ Here is the call graph for this function:

◆ getMouseWheel()

virtual s32 RealInputHandler::getMouseWheel ( )
inlinevirtual

Implements InputHandler.

References MyEventReceiver::getMouseWheel(), and m_receiver.

+ Here is the call graph for this function:

◆ isKeyDown()

virtual bool RealInputHandler::isKeyDown ( GameKeyType k)
inlinevirtual

Implements InputHandler.

References MyEventReceiver::IsKeyDown(), JoystickController::isKeyDown(), InputHandler::joystick, KeyCache::key, InputHandler::keycache, and m_receiver.

+ Here is the call graph for this function:

◆ listenForKey()

virtual void RealInputHandler::listenForKey ( const KeyPress & keyCode)
inlinevirtual

Reimplemented from InputHandler.

References MyEventReceiver::listenForKey(), and m_receiver.

+ Here is the call graph for this function:

◆ releaseAllKeys()

void RealInputHandler::releaseAllKeys ( )
inlinevirtual

Reimplemented from InputHandler.

References InputHandler::joystick, m_receiver, JoystickController::releaseAllKeys(), and MyEventReceiver::releaseAllKeys().

+ Here is the call graph for this function:

◆ setMousePos()

void RealInputHandler::setMousePos ( s32 x,
s32 y )
virtual

Implements InputHandler.

References RenderingEngine::get_raw_device(), and m_mousepos.

+ Here is the call graph for this function:

◆ wasKeyDown()

virtual bool RealInputHandler::wasKeyDown ( GameKeyType k)
inlinevirtual

Implements InputHandler.

References InputHandler::joystick, KeyCache::key, InputHandler::keycache, m_receiver, MyEventReceiver::WasKeyDown(), and JoystickController::wasKeyDown().

Referenced by cancelPressed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wasKeyPressed()

virtual bool RealInputHandler::wasKeyPressed ( GameKeyType k)
inlinevirtual

Implements InputHandler.

References InputHandler::joystick, KeyCache::key, InputHandler::keycache, m_receiver, MyEventReceiver::WasKeyPressed(), and JoystickController::wasKeyPressed().

+ Here is the call graph for this function:

◆ wasKeyReleased()

virtual bool RealInputHandler::wasKeyReleased ( GameKeyType k)
inlinevirtual

Implements InputHandler.

References InputHandler::joystick, KeyCache::key, InputHandler::keycache, m_receiver, MyEventReceiver::WasKeyReleased(), and JoystickController::wasKeyReleased().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_mousepos

v2s32 RealInputHandler::m_mousepos
private

Referenced by getMousePos(), and setMousePos().

◆ m_receiver


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