Added Events::finalize
This commit is contained in:
parent
e5fd0582d6
commit
667eb6bab5
@ -330,6 +330,7 @@ int main() {
|
|||||||
|
|
||||||
delete assets;
|
delete assets;
|
||||||
finalize_renderer();
|
finalize_renderer();
|
||||||
|
Events::finalize();
|
||||||
Window::terminate();
|
Window::terminate();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,6 +70,11 @@ int Events::initialize(){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Events::finalize(){
|
||||||
|
delete[] _keys;
|
||||||
|
delete[] _frames;
|
||||||
|
}
|
||||||
|
|
||||||
bool Events::pressed(int keycode){
|
bool Events::pressed(int keycode){
|
||||||
if (keycode < 0 || keycode >= _MOUSE_BUTTONS)
|
if (keycode < 0 || keycode >= _MOUSE_BUTTONS)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -18,6 +18,7 @@ public:
|
|||||||
static bool _cursor_started;
|
static bool _cursor_started;
|
||||||
|
|
||||||
static int initialize();
|
static int initialize();
|
||||||
|
static void finalize();
|
||||||
static void pullEvents();
|
static void pullEvents();
|
||||||
|
|
||||||
static bool pressed(int keycode);
|
static bool pressed(int keycode);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user