mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
refactor input.h and related
This commit is contained in:
parent
9c31c6c8b7
commit
8bb1045e34
12 changed files with 236 additions and 254 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue