aboutsummaryrefslogtreecommitdiff
path: root/game/QuitScript.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2025-01-10 14:43:42 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2025-01-10 14:43:42 +0100
commitd1cebcca2018ed4ef47ad125e45aafd018a2ab2e (patch)
tree8f4881cf4abc58774625383620cf82fa55b9d1f0 /game/QuitScript.cpp
parent938b6a7bb62459e8308320280d15ccaf1b8af0ac (diff)
make format
Diffstat (limited to 'game/QuitScript.cpp')
-rw-r--r--game/QuitScript.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/game/QuitScript.cpp b/game/QuitScript.cpp
index fc33dcf..0c9f55a 100644
--- a/game/QuitScript.cpp
+++ b/game/QuitScript.cpp
@@ -5,19 +5,16 @@
#include <crepe/api/Event.h>
#include <crepe/api/KeyCodes.h>
-
using namespace crepe;
-bool QuitScript::on_event(const KeyPressEvent & ev){
+bool QuitScript::on_event(const KeyPressEvent & ev) {
if (Keycode::ESCAPE == ev.key) {
- trigger_event<ShutDownEvent>(ShutDownEvent{});
+ trigger_event<ShutDownEvent>(ShutDownEvent {});
}
return false;
}
-
-
-void QuitScript::init(){
+void QuitScript::init() {
subscribe<KeyPressEvent>([this](const KeyPressEvent & ev) -> bool {
return this->on_event(ev);
});