diff options
Diffstat (limited to 'include/events.hpp')
-rw-r--r-- | include/events.hpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/events.hpp b/include/events.hpp new file mode 100644 index 0000000..aa3ca07 --- /dev/null +++ b/include/events.hpp @@ -0,0 +1,31 @@ +#ifndef EVENTS_HPP_ +#define EVENTS_HPP_ + +/** + * A place for events to live, while gamedev slowly dies from rewriting. + */ + +#include <SDL2/SDL.h> + + struct MouseScrollEvent { + MouseScrollEvent(int sd) + : scrollDistance(sd) {} + + int scrollDistance; + }; + +struct KeyDownEvent { + KeyDownEvent(SDL_Keycode kc) + : keycode(kc) {} + + SDL_Keycode keycode; +}; + +struct KeyUpEvent { + KeyUpEvent(SDL_Keycode kc) + : keycode(kc) {} + + SDL_Keycode keycode; +}; + +#endif // EVENTS_HPP_ |