mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-15 07:51:50 +00:00
Added Events::finalize
This commit is contained in:
parent
e5fd0582d6
commit
667eb6bab5
3 changed files with 7 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue