22 #ifndef ULTIMA4_CONTROLLERS_KEY_HANDLER_CONTROLLER_H 23 #define ULTIMA4_CONTROLLERS_KEY_HANDLER_CONTROLLER_H 25 #include "ultima/ultima4/controllers/controller.h" 38 typedef bool (*Callback)(int,
void *);
45 int _screenX, _screenY;
51 int (*_handleChoice)(int);
55 KeyHandler(Callback func,
void *data =
nullptr,
bool asyncronous =
true);
76 bool operator==(Callback cb)
const;
109 bool keyPressed(
int key)
override;
Definition: controller.h:35
struct Ultima::Ultima4::KeyHandler::GetChoice GetChoice
Definition: detection.h:27
static bool globalHandler(int key)
virtual bool isKeyIgnored(int key)
struct Ultima::Ultima4::KeyHandler::ReadBuffer ReadBuffer
Definition: key_handler_controller.h:49
Definition: key_handler_controller.h:33
static bool ignoreKeys(int key, void *data)
Definition: key_handler_controller.h:104
Definition: key_handler_controller.h:41
static bool defaultHandler(int key, void *data)