refactor input.h and related

This commit is contained in:
A-lex-Ra
2024-02-23 18:49:15 +06:00
parent 9c31c6c8b7
commit 8bb1045e34
12 changed files with 236 additions and 254 deletions
+2 -2
View File
@@ -90,14 +90,14 @@ void Engine::updateTimers() {
}
void Engine::updateHotkeys() {
if (Events::jpressed(keycode::F2)) {
if (Events::jpressed(static_cast<int>(keycode::F2))) {
std::unique_ptr<ImageData> image(Window::takeScreenshot());
image->flipY();
fs::path filename = paths->getScreenshotFile("png");
png::write_image(filename.string(), image.get());
std::cout << "saved screenshot as " << filename << std::endl;
}
if (Events::jpressed(keycode::F11)) {
if (Events::jpressed(static_cast<int>(keycode::F11))) {
Window::toggleFullscreen();
}
}