func name fix

This commit is contained in:
zebra 2022-11-08 10:51:13 +03:00
parent 8a073e4e8a
commit 815aa90489
3 changed files with 4 additions and 4 deletions

View File

@ -120,7 +120,7 @@ void mainloop(Level* level, Assets* assets) {
float delta = 0.0f; float delta = 0.0f;
bool occlusion = true; bool occlusion = true;
bool devdata = false; bool devdata = false;
Window::swapInterval(1); Window::swapInterval(0);
while (!Window::isShouldClose()){ while (!Window::isShouldClose()){
frame++; frame++;
float currentTime = glfwGetTime(); float currentTime = glfwGetTime();
@ -131,7 +131,7 @@ void mainloop(Level* level, Assets* assets) {
Window::setShouldClose(true); Window::setShouldClose(true);
} }
if (Events::jpressed(GLFW_KEY_TAB)){ if (Events::jpressed(GLFW_KEY_TAB)){
Events::toogleCursor(); Events::toggleCursor();
} }
if (Events::jpressed(GLFW_KEY_O)){ if (Events::jpressed(GLFW_KEY_O)){
occlusion = !occlusion; occlusion = !occlusion;

View File

@ -97,7 +97,7 @@ bool Events::jclicked(int button){
return _keys[index] && _frames[index] == _current; return _keys[index] && _frames[index] == _current;
} }
void Events::toogleCursor(){ void Events::toggleCursor(){
_cursor_locked = !_cursor_locked; _cursor_locked = !_cursor_locked;
Window::setCursorMode(_cursor_locked ? GLFW_CURSOR_DISABLED : GLFW_CURSOR_NORMAL); Window::setCursorMode(_cursor_locked ? GLFW_CURSOR_DISABLED : GLFW_CURSOR_NORMAL);
} }

View File

@ -27,7 +27,7 @@ public:
static bool clicked(int button); static bool clicked(int button);
static bool jclicked(int button); static bool jclicked(int button);
static void toogleCursor(); static void toggleCursor();
}; };
#endif /* WINDOW_EVENTS_H_ */ #endif /* WINDOW_EVENTS_H_ */