diff options
Diffstat (limited to 'src/event.cpp')
-rw-r--r-- | src/event.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/event.cpp b/src/event.cpp new file mode 100644 index 0000000..369edbc --- /dev/null +++ b/src/event.cpp @@ -0,0 +1,32 @@ +#include "event.h" + +Event::Event() +{ + run = true; +}; + +int Event::Poll() +{ + SDL_PollEvent(&v); +}; + +void Event::off() +{ + run = false; +} + +bool Event::gRun() +{ + return run; +}; + +SDL_Event& Event::gEvent() +{ + SDL_Event* x = &v; + return *x; +}; + +int Event::gEventType() +{ + return v.type; +}; |