From 48015cd425b26eb68eb07f4e4b1adf71e81e11b1 Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Mon, 25 Nov 2024 11:48:39 +0100 Subject: make format --- src/example/gameloop.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/example/gameloop.cpp') diff --git a/src/example/gameloop.cpp b/src/example/gameloop.cpp index d45b3ce..b8ee9d8 100644 --- a/src/example/gameloop.cpp +++ b/src/example/gameloop.cpp @@ -1,17 +1,16 @@ -#include #include "crepe/api/LoopManager.h" #include #include #include #include +#include using namespace crepe; class TestKeyListener : public IKeyListener { public: bool on_key_pressed(const KeyPressEvent & event) override { std::cout << "TestKeyListener: Key Pressed - Code: " << static_cast(event.key) << std::endl; - if(event.key == Keycode::ESCAPE){ - + if (event.key == Keycode::ESCAPE) { } return false; } @@ -21,20 +20,19 @@ public: return false; } }; -bool on_key_pressed(const KeyPressEvent & event){ - std::cout << "TestKeyListener: Key Pressed - Code: " << static_cast(event.key) - << std::endl; - if(event.key == Keycode::ESCAPE){ - return true; - } - return false; +bool on_key_pressed(const KeyPressEvent & event) { + std::cout << "TestKeyListener: Key Pressed - Code: " << static_cast(event.key) + << std::endl; + if (event.key == Keycode::ESCAPE) { + return true; } + return false; +} int main() { LoopManager gameloop; TestKeyListener key_listener; EventManager::get_instance().subscribe(on_key_pressed); gameloop.start(); - - + return 1; } -- cgit v1.2.3