mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 19:05:59 -04:00
Added SDL_UserEvent support
This commit is contained in:
parent
40a5297f0e
commit
f6695239d5
@ -62,7 +62,7 @@ namespace Private {
|
||||
SDL_TextEditingEvent,
|
||||
SDL_TextInputEvent,
|
||||
SDL_TouchFingerEvent,
|
||||
//SDL_UserEvent, <- User events are a special case
|
||||
SDL_UserEvent,
|
||||
SDL_WindowEvent
|
||||
>;
|
||||
|
||||
|
@ -97,7 +97,7 @@ namespace Private {
|
||||
SDL2PP_DEFINE_EVENT_MAPPING(SDL_TextEditingEvent, event.type == SDL_TEXTEDITING, event.edit);
|
||||
SDL2PP_DEFINE_EVENT_MAPPING(SDL_TextInputEvent, event.type == SDL_TEXTINPUT, event.text);
|
||||
SDL2PP_DEFINE_EVENT_MAPPING(SDL_TouchFingerEvent, event.type == SDL_FINGERMOTION || event.type == SDL_FINGERDOWN || event.type == SDL_FINGERUP, event.tfinger);
|
||||
//SDL2PP_DEFINE_EVENT_MAPPING(SDL_UserEvent, event.type == SDL_USEREVENT, event.user); <- This won't work
|
||||
SDL2PP_DEFINE_EVENT_MAPPING(SDL_UserEvent, SDL_USEREVENT <= event.type && event.type <= SDL_LASTEVENT, event.user);
|
||||
SDL2PP_DEFINE_EVENT_MAPPING(SDL_WindowEvent, event.type == SDL_WINDOWEVENT, event.window);
|
||||
|
||||
#undef SDL2PP_DEFINE_EVENT_MAPPING
|
||||
|
Loading…
x
Reference in New Issue
Block a user