Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
MyEventReceiver Class Reference

#include <inputhandler.h>

+ Inheritance diagram for MyEventReceiver:
+ Collaboration diagram for MyEventReceiver:

Public Member Functions

virtual bool OnEvent (const SEvent &event)
 
bool IsKeyDown (const KeyPress &keyCode) const
 
bool WasKeyDown (const KeyPress &keyCode)
 
bool WasKeyPressed (const KeyPress &keycode) const
 
bool WasKeyReleased (const KeyPress &keycode) const
 
void listenForKey (const KeyPress &keyCode)
 
void dontListenForKeys ()
 
s32 getMouseWheel ()
 
void clearInput ()
 
void releaseAllKeys ()
 
void clearWasKeyPressed ()
 
void clearWasKeyReleased ()
 
PointerType getLastPointerType ()
 

Public Attributes

JoystickControllerjoystick = nullptr
 

Private Attributes

s32 mouse_wheel = 0
 
KeyList keyIsDown
 
KeyList keyWasDown
 
KeyList keyWasPressed
 
KeyList keyWasReleased
 
KeyList keysListenedFor
 
bool fullscreen_is_down = false
 
PointerType last_pointer_type = PointerType::Mouse
 

Member Function Documentation

◆ clearInput()

void MyEventReceiver::clearInput ( )
inline

References KeyList::clear(), keyIsDown, keyWasDown, keyWasPressed, keyWasReleased, and mouse_wheel.

Referenced by RealInputHandler::clear().

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

◆ clearWasKeyPressed()

void MyEventReceiver::clearWasKeyPressed ( )
inline

References KeyList::clear(), and keyWasPressed.

Referenced by RealInputHandler::clearWasKeyPressed().

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

◆ clearWasKeyReleased()

void MyEventReceiver::clearWasKeyReleased ( )
inline

References KeyList::clear(), and keyWasReleased.

Referenced by RealInputHandler::clearWasKeyReleased().

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

◆ dontListenForKeys()

void MyEventReceiver::dontListenForKeys ( )
inline

References KeyList::clear(), and keysListenedFor.

Referenced by RealInputHandler::dontListenForKeys().

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

◆ getLastPointerType()

PointerType MyEventReceiver::getLastPointerType ( )
inline

References last_pointer_type.

Referenced by RenderingEngine::getLastPointerType().

+ Here is the caller graph for this function:

◆ getMouseWheel()

s32 MyEventReceiver::getMouseWheel ( )
inline

References mouse_wheel.

Referenced by RealInputHandler::getMouseWheel().

+ Here is the caller graph for this function:

◆ IsKeyDown()

bool MyEventReceiver::IsKeyDown ( const KeyPress & keyCode) const
inline

References keyIsDown.

Referenced by RealInputHandler::isKeyDown(), and OnEvent().

+ Here is the caller graph for this function:

◆ listenForKey()

void MyEventReceiver::listenForKey ( const KeyPress & keyCode)
inline

References keysListenedFor, and KeyList::set().

Referenced by RealInputHandler::listenForKey().

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

◆ OnEvent()

◆ releaseAllKeys()

void MyEventReceiver::releaseAllKeys ( )
inline

References KeyList::append(), KeyList::clear(), keyIsDown, and keyWasReleased.

Referenced by RealInputHandler::releaseAllKeys().

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

◆ WasKeyDown()

bool MyEventReceiver::WasKeyDown ( const KeyPress & keyCode)
inline

References keyWasDown, and KeyList::unset().

Referenced by RealInputHandler::wasKeyDown().

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

◆ WasKeyPressed()

bool MyEventReceiver::WasKeyPressed ( const KeyPress & keycode) const
inline

References keyWasPressed.

Referenced by RealInputHandler::wasKeyPressed().

+ Here is the caller graph for this function:

◆ WasKeyReleased()

bool MyEventReceiver::WasKeyReleased ( const KeyPress & keycode) const
inline

References keyWasReleased.

Referenced by RealInputHandler::wasKeyReleased().

+ Here is the caller graph for this function:

Member Data Documentation

◆ fullscreen_is_down

bool MyEventReceiver::fullscreen_is_down = false
private

Referenced by OnEvent().

◆ joystick

◆ keyIsDown

KeyList MyEventReceiver::keyIsDown
private

◆ keysListenedFor

KeyList MyEventReceiver::keysListenedFor
private

◆ keyWasDown

KeyList MyEventReceiver::keyWasDown
private

Referenced by clearInput(), OnEvent(), and WasKeyDown().

◆ keyWasPressed

KeyList MyEventReceiver::keyWasPressed
private

◆ keyWasReleased

KeyList MyEventReceiver::keyWasReleased
private

◆ last_pointer_type

PointerType MyEventReceiver::last_pointer_type = PointerType::Mouse
private

Referenced by getLastPointerType(), and OnEvent().

◆ mouse_wheel

s32 MyEventReceiver::mouse_wheel = 0
private

Referenced by clearInput(), getMouseWheel(), and OnEvent().


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