22 #ifndef COMMON_ACTION_H 23 #define COMMON_ACTION_H 25 #include "common/scummsys.h" 27 #include "common/array.h" 28 #include "common/events.h" 29 #include "common/str.h" 30 #include "common/ustr.h" 37 const char *defaultHwId;
38 const char *description;
52 bool _shouldTriggerOnKbdRepeats;
57 void setEvent(
const Event &evt) {
68 event.type = EVENT_CUSTOM_BACKEND_ACTION_START;
69 event.customType = evtType;
74 event.type = EVENT_CUSTOM_BACKEND_ACTION_AXIS;
75 event.customType = evtType;
80 event.type = EVENT_CUSTOM_ENGINE_ACTION_START;
81 event.customType = evtType;
84 void setKeyEvent(
const KeyState &ks) {
90 void setLeftClickEvent() {
91 setEvent(EVENT_LBUTTONDOWN);
94 void setMiddleClickEvent() {
95 setEvent(EVENT_MBUTTONDOWN);
98 void setRightClickEvent() {
99 setEvent(EVENT_RBUTTONDOWN);
102 void setMouseWheelUpEvent() {
103 setEvent(EVENT_WHEELUP);
106 void setMouseWheelDownEvent() {
107 setEvent(EVENT_WHEELDOWN);
110 void setX1ClickEvent() {
114 void setX2ClickEvent() {
115 setEvent(EVENT_X2BUTTONDOWN);
129 _shouldTriggerOnKbdRepeats =
true;
132 bool shouldTriggerOnKbdRepeats()
const {
return _shouldTriggerOnKbdRepeats; }
143 void addDefaultInputMapping(
const String &hwId);
146 return _defaultInputMapping;
153 #endif // #ifndef COMMON_ACTION_H
U32String description
Definition: action.h:45
EventType
Definition: events.h:49
uint32 CustomEventType
Definition: events.h:193
const char * id
Definition: action.h:43
Definition: algorithm.h:29
Event event
Definition: action.h:48
void allowKbdRepeats()
Definition: action.h:128
Definition: keyboard.h:294