diff options
author | jacopograndi <jak.sk8@hotmail.it> | 2021-08-19 18:46:51 +0200 |
---|---|---|
committer | jacopograndi <jak.sk8@hotmail.it> | 2021-08-19 18:46:51 +0200 |
commit | a8bcacc95045102e67f2feabbdddf79535837554 (patch) | |
tree | 5781dd4cb2fe66b67deab84ff4641b7e21b9c174 /commands/commands.h |
forgot to make repo until now
Diffstat (limited to 'commands/commands.h')
-rw-r--r-- | commands/commands.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/commands/commands.h b/commands/commands.h new file mode 100644 index 0000000..665c8b6 --- /dev/null +++ b/commands/commands.h @@ -0,0 +1,28 @@ +#ifndef COMMANDS_H +#define COMMANDS_H + +#include <iostream> +#include <vector> + +#define SDL_MAIN_HANDLED +#include <SDL2/SDL.h> + +class Commands_sdl { + public: + Commands_sdl (); + ~Commands_sdl (); + bool process_events (); + void process_clicks (); + void process_keys (); + bool check_keydown(SDL_Scancode key); + bool check_key(SDL_Scancode key); + int mx, my; + int mclick[3]; + int mheld[3]; + + private: + std::vector<SDL_Scancode> keys; + std::vector<SDL_Scancode> keysdown; +}; + +#endif
\ No newline at end of file |