Minetest  5.4.0
RandomInputHandler Class Reference

#include <inputhandler.h>

+ Inheritance diagram for RandomInputHandler:
+ Collaboration diagram for RandomInputHandler:

Public Member Functions

 RandomInputHandler ()=default
 
bool isRandom () const
 
virtual bool isKeyDown (GameKeyType k)
 
virtual bool wasKeyDown (GameKeyType k)
 
virtual bool wasKeyPressed (GameKeyType k)
 
virtual bool wasKeyReleased (GameKeyType k)
 
virtual bool cancelPressed ()
 
virtual v2s32 getMousePos ()
 
virtual void setMousePos (s32 x, s32 y)
 
virtual s32 getMouseWheel ()
 
virtual void step (float dtime)
 
s32 Rand (s32 min, s32 max)
 
- Public Member Functions inherited from InputHandler
 InputHandler ()
 
virtual ~InputHandler ()=default
 
virtual void clearWasKeyPressed ()
 
virtual void clearWasKeyReleased ()
 
virtual void listenForKey (const KeyPress &keyCode)
 
virtual void dontListenForKeys ()
 
virtual void clear ()
 

Private Attributes

KeyList keydown
 
v2s32 mousepos
 
v2s32 mousespeed
 

Additional Inherited Members

- Public Attributes inherited from InputHandler
JoystickController joystick
 
KeyCache keycache
 

Constructor & Destructor Documentation

◆ RandomInputHandler()

RandomInputHandler::RandomInputHandler ( )
default

Member Function Documentation

◆ cancelPressed()

virtual bool RandomInputHandler::cancelPressed ( )
inlinevirtual

Implements InputHandler.

◆ getMousePos()

virtual v2s32 RandomInputHandler::getMousePos ( )
inlinevirtual

Implements InputHandler.

References mousepos.

◆ getMouseWheel()

virtual s32 RandomInputHandler::getMouseWheel ( )
inlinevirtual

Implements InputHandler.

◆ isKeyDown()

virtual bool RandomInputHandler::isKeyDown ( GameKeyType  k)
inlinevirtual

◆ isRandom()

bool RandomInputHandler::isRandom ( ) const
inlinevirtual

Reimplemented from InputHandler.

◆ Rand()

s32 RandomInputHandler::Rand ( s32  min,
s32  max 
)

References myrand().

Referenced by step().

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

◆ setMousePos()

virtual void RandomInputHandler::setMousePos ( s32  x,
s32  y 
)
inlinevirtual

Implements InputHandler.

References mousepos.

◆ step()

void RandomInputHandler::step ( float  dtime)
virtual

Reimplemented from InputHandler.

References RandomInputHandlerSimData::counter, getKeySetting(), keydown, mousepos, mousespeed, Rand(), and KeyList::toggle().

+ Here is the call graph for this function:

◆ wasKeyDown()

virtual bool RandomInputHandler::wasKeyDown ( GameKeyType  k)
inlinevirtual

Implements InputHandler.

◆ wasKeyPressed()

virtual bool RandomInputHandler::wasKeyPressed ( GameKeyType  k)
inlinevirtual

Implements InputHandler.

◆ wasKeyReleased()

virtual bool RandomInputHandler::wasKeyReleased ( GameKeyType  k)
inlinevirtual

Implements InputHandler.

Member Data Documentation

◆ keydown

KeyList RandomInputHandler::keydown
private

Referenced by isKeyDown(), and step().

◆ mousepos

v2s32 RandomInputHandler::mousepos
private

Referenced by getMousePos(), setMousePos(), and step().

◆ mousespeed

v2s32 RandomInputHandler::mousespeed
private

Referenced by step().


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