OpenBlox
A game engine which provides a simple and easy to learn Lua API.
OB::OBInputEventReceiver Class Reference

#include <OBInputEventReceiver.h>

Inheritance diagram for OB::OBInputEventReceiver:

Public Member Functions

 OBInputEventReceiver (OBEngine *eng)
 
virtual ~OBInputEventReceiver ()
 
virtual bool OnEvent (const irr::SEvent &evt)
 
void focus ()
 
void unfocus ()
 
void input_mouseButton (Enum::MouseButton btn, bool state)
 
void input_mouseWheel (shared_ptr< Type::Vector2 > delta)
 
void input_mouseMoved (shared_ptr< Type::Vector2 > pos, shared_ptr< Type::Vector2 > delta)
 
void input_keyEvent (Enum::KeyCode keyCode, bool state)
 
OBEnginegetEngine ()
 

Static Public Member Functions

static Enum::KeyCode irrlictKeyToOB (irr::EKEY_CODE irrKey)
 

Detailed Description

This class handles basic input from Irrlicht.

Author
John M. Harris, Jr.
Date
November 2018

Constructor & Destructor Documentation

◆ OBInputEventReceiver()

OB::OBInputEventReceiver::OBInputEventReceiver ( OBEngine eng)

◆ ~OBInputEventReceiver()

virtual OB::OBInputEventReceiver::~OBInputEventReceiver ( )
virtual

Member Function Documentation

◆ focus()

void OB::OBInputEventReceiver::focus ( )

Convenience method that fires the WindowFocused event of Instance::UserInputService

Author
John M. Harris, Jr.

◆ getEngine()

OBEngine* OB::OBInputEventReceiver::getEngine ( )

◆ input_keyEvent()

void OB::OBInputEventReceiver::input_keyEvent ( Enum::KeyCode  keyCode,
bool  state 
)

Convenience method that calls Instance::UserInputService::input_keyEvent

Author
John M. Harris, Jr.

◆ input_mouseButton()

void OB::OBInputEventReceiver::input_mouseButton ( Enum::MouseButton  btn,
bool  state 
)

Convenience method that calls Instance::UserInputService::input_mouseButton

Author
John M. Harris, Jr.

◆ input_mouseMoved()

void OB::OBInputEventReceiver::input_mouseMoved ( shared_ptr< Type::Vector2 pos,
shared_ptr< Type::Vector2 delta 
)

Convenience method that calls Instance::UserInputService::input_mouseMoved

Author
John M. Harris, Jr.

◆ input_mouseWheel()

void OB::OBInputEventReceiver::input_mouseWheel ( shared_ptr< Type::Vector2 delta)

Convenience method that calls Instance::UserInputService::input_mouseWheel

Author
John M. Harris, Jr.

◆ irrlictKeyToOB()

static Enum::KeyCode OB::OBInputEventReceiver::irrlictKeyToOB ( irr::EKEY_CODE  irrKey)
static

Converts an Irrlicht key code to an OB KeyCode

Author
John M. Harris, Jr.

◆ OnEvent()

virtual bool OB::OBInputEventReceiver::OnEvent ( const irr::SEvent &  evt)
virtual

Process an Irrlicht event

Author
John M. Harris, Jr.

◆ unfocus()

void OB::OBInputEventReceiver::unfocus ( )

Convenience method that fires the WindowFocusReleased event of Instance::UserInputService

Author
John M. Harris, Jr.

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