Luanti 5.16.0-dev
Loading...
Searching...
No Matches
InputHandler Class Referenceabstract

#include <inputhandler.h>

Inheritance diagram for InputHandler:
Collaboration diagram for InputHandler:

Public Member Functions

 InputHandler ()
virtual ~InputHandler ()=default
virtual bool isRandom () const
virtual bool isKeyDown (GameKeyType k)=0
virtual bool wasKeyDown (GameKeyType k)=0
virtual bool wasKeyPressed (GameKeyType k)=0
virtual bool wasKeyReleased (GameKeyType k)=0
virtual bool cancelPressed ()=0
virtual float getJoystickSpeed ()=0
virtual float getJoystickDirection ()=0
virtual void clearWasKeyPressed ()
virtual void clearWasKeyReleased ()
virtual void reloadKeybindings ()
virtual v2s32 getMousePos ()=0
virtual void setMousePos (s32 x, s32 y)=0
virtual s32 getMouseWheel ()=0
virtual void step (float dtime)
virtual void clear ()
virtual void releaseAllKeys ()

Static Public Member Functions

static void settingChangedCallback (const std::string &name, void *data)

Public Attributes

JoystickController joystick

Constructor & Destructor Documentation

◆ InputHandler()

InputHandler::InputHandler ( )
inline

References g_settings, Settings::getLayer(), settingChangedCallback(), SL_DEFAULTS, and str_starts_with().

Referenced by settingChangedCallback().

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

◆ ~InputHandler()

virtual InputHandler::~InputHandler ( )
virtualdefault

Member Function Documentation

◆ cancelPressed()

virtual bool InputHandler::cancelPressed ( )
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

◆ clear()

virtual void InputHandler::clear ( )
inlinevirtual

Reimplemented in RealInputHandler.

◆ clearWasKeyPressed()

virtual void InputHandler::clearWasKeyPressed ( )
inlinevirtual

Reimplemented in RealInputHandler.

◆ clearWasKeyReleased()

virtual void InputHandler::clearWasKeyReleased ( )
inlinevirtual

Reimplemented in RealInputHandler.

◆ getJoystickDirection()

virtual float InputHandler::getJoystickDirection ( )
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

◆ getJoystickSpeed()

virtual float InputHandler::getJoystickSpeed ( )
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

◆ getMousePos()

virtual v2s32 InputHandler::getMousePos ( )
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

◆ getMouseWheel()

virtual s32 InputHandler::getMouseWheel ( )
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

◆ isKeyDown()

virtual bool InputHandler::isKeyDown ( GameKeyType k)
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

◆ isRandom()

virtual bool InputHandler::isRandom ( ) const
inlinevirtual

Reimplemented in RandomInputHandler.

◆ releaseAllKeys()

virtual void InputHandler::releaseAllKeys ( )
inlinevirtual

Reimplemented in RealInputHandler.

◆ reloadKeybindings()

virtual void InputHandler::reloadKeybindings ( )
inlinevirtual

Reimplemented in RealInputHandler.

Referenced by settingChangedCallback().

Here is the caller graph for this function:

◆ setMousePos()

virtual void InputHandler::setMousePos ( s32 x,
s32 y )
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

References x, and y.

◆ settingChangedCallback()

void InputHandler::settingChangedCallback ( const std::string & name,
void * data )
inlinestatic

References InputHandler(), and reloadKeybindings().

Referenced by InputHandler().

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

◆ step()

virtual void InputHandler::step ( float dtime)
inlinevirtual

Reimplemented in RandomInputHandler.

◆ wasKeyDown()

virtual bool InputHandler::wasKeyDown ( GameKeyType k)
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

◆ wasKeyPressed()

virtual bool InputHandler::wasKeyPressed ( GameKeyType k)
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

◆ wasKeyReleased()

virtual bool InputHandler::wasKeyReleased ( GameKeyType k)
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

Member Data Documentation

◆ joystick


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