Minetest  5.4.0
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 void clearWasKeyPressed ()
 
virtual void clearWasKeyReleased ()
 
virtual void listenForKey (const KeyPress &keyCode)
 
virtual void dontListenForKeys ()
 
virtual v2s32 getMousePos ()=0
 
virtual void setMousePos (s32 x, s32 y)=0
 
virtual s32 getMouseWheel ()=0
 
virtual void step (float dtime)
 
virtual void clear ()
 

Public Attributes

JoystickController joystick
 
KeyCache keycache
 

Constructor & Destructor Documentation

◆ InputHandler()

InputHandler::InputHandler ( )
inline

References KeyCache::handler, keycache, and KeyCache::populate().

+ Here is the call graph for this function:

◆ ~InputHandler()

virtual InputHandler::~InputHandler ( )
virtualdefault

Member Function Documentation

◆ cancelPressed()

virtual bool InputHandler::cancelPressed ( )
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

Referenced by Game::connectToServer(), Game::getServerContent(), and Game::processKeyInput().

+ Here is the caller graph for this function:

◆ clear()

virtual void InputHandler::clear ( )
inlinevirtual

Reimplemented in RealInputHandler.

Referenced by Game::connectToServer(), Game::getServerContent(), and Game::processUserInput().

+ Here is the caller graph for this function:

◆ clearWasKeyPressed()

virtual void InputHandler::clearWasKeyPressed ( )
inlinevirtual

Reimplemented in RealInputHandler.

Referenced by Game::processPlayerInteraction().

+ Here is the caller graph for this function:

◆ clearWasKeyReleased()

virtual void InputHandler::clearWasKeyReleased ( )
inlinevirtual

Reimplemented in RealInputHandler.

Referenced by Game::processPlayerInteraction().

+ Here is the caller graph for this function:

◆ dontListenForKeys()

virtual void InputHandler::dontListenForKeys ( )
inlinevirtual

Reimplemented in RealInputHandler.

Referenced by KeyCache::populate().

+ Here is the caller graph for this function:

◆ getMousePos()

virtual v2s32 InputHandler::getMousePos ( )
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

Referenced by Game::updateCameraOrientation().

+ Here is the caller graph for this function:

◆ getMouseWheel()

virtual s32 InputHandler::getMouseWheel ( )
pure virtual

Implemented in RandomInputHandler, and RealInputHandler.

Referenced by Game::processItemSelection().

+ Here is the caller graph for this function:

◆ isKeyDown()

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

Implemented in RandomInputHandler, and RealInputHandler.

Referenced by Game::isKeyDown(), and Game::updatePlayerControl().

+ Here is the caller graph for this function:

◆ isRandom()

virtual bool InputHandler::isRandom ( ) const
inlinevirtual

Reimplemented in RandomInputHandler.

Referenced by Game::nodePlacement(), and Game::updateCameraDirection().

+ Here is the caller graph for this function:

◆ listenForKey()

virtual void InputHandler::listenForKey ( const KeyPress keyCode)
inlinevirtual

Reimplemented in RealInputHandler.

Referenced by KeyCache::populate().

+ Here is the caller graph for this function:

◆ setMousePos()

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

Implemented in RandomInputHandler, and RealInputHandler.

Referenced by Game::updateCameraDirection(), and Game::updateCameraOrientation().

+ Here is the caller graph for this function:

◆ step()

virtual void InputHandler::step ( float  dtime)
inlinevirtual

Reimplemented in RandomInputHandler.

Referenced by Game::processUserInput().

+ Here is the caller graph for this function:

◆ wasKeyDown()

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

Implemented in RandomInputHandler, and RealInputHandler.

Referenced by Game::wasKeyDown().

+ Here is the caller graph for this function:

◆ wasKeyPressed()

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

Implemented in RandomInputHandler, and RealInputHandler.

Referenced by Game::wasKeyPressed().

+ Here is the caller graph for this function:

◆ wasKeyReleased()

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

Implemented in RandomInputHandler, and RealInputHandler.

Referenced by Game::wasKeyReleased().

+ Here is the caller graph for this function:

Member Data Documentation

◆ joystick

◆ keycache


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