18#ifndef HEADER_EVENT_HANDLER_HPP
19#define HEADER_EVENT_HANDLER_HPP
22#include <IEventReceiver.h>
23#include "input/input.hpp"
24#include "utils/leak_check.hpp"
38 EVENT_BLOCK_BUT_HANDLED,
42 enum NavigationDirection
72 EventPropagation onGUIEvent(
const irr::SEvent& event);
73 EventPropagation onWidgetActivated(
Widget* w,
const int playerID, Input::InputType type);
74 void sendNavigationEvent(
const NavigationDirection nav,
const int playerID);
75 void navigate(
const NavigationDirection nav,
const int playerID);
98 bool OnEvent (const irr::SEvent &event);
106 Input::InputType type, const
int playerID);
113 static void deallocate();
117 Widget* w,
bool ignore_disabled,
int recursion_counter=1);
Class to handle irrLicht events (GUI and input as well)
Definition: event_handler.hpp:66
int findIDClosestWidget(const NavigationDirection nav, const int playerID, Widget *w, bool ignore_disabled, int recursion_counter=1)
This function use simple heuristic to find the closest widget in the requested direction,...
Definition: event_handler.cpp:516
void processGUIAction(const PlayerAction action, int deviceID, const unsigned int value, Input::InputType type, const int playerID)
When the input module is done processing an input and mapped it to an action, and this action needs t...
Definition: event_handler.cpp:263
static EventHandler * get()
singleton access
Definition: event_handler.cpp:343
void sendEventToUser(Widget *widget, std::string &name, const int playerID)
send an event to the GUI module user's event callback
Definition: event_handler.cpp:707
irr::core::vector2di m_mouse_pos
Last position of the mouse cursor.
Definition: event_handler.hpp:85
const irr::core::vector2di & getMousePos() const
Get the mouse position.
Definition: event_handler.hpp:109
void navigate(const NavigationDirection nav, const int playerID)
Focus the next widget downards, upwards, leftwards or rightwards.
Definition: event_handler.cpp:459
bool OnEvent(const irr::SEvent &event)
All irrLicht events will go through this (input as well GUI; input events are immediately delegated t...
Definition: event_handler.cpp:70
bool m_accept_events
This variable is used to ignore events during the initial load screen, so that a player cannot trigge...
Definition: event_handler.hpp:70
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33