diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-10 14:43:42 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-10 14:43:42 +0100 |
commit | d1cebcca2018ed4ef47ad125e45aafd018a2ab2e (patch) | |
tree | 8f4881cf4abc58774625383620cf82fa55b9d1f0 /game/QuitScript.cpp | |
parent | 938b6a7bb62459e8308320280d15ccaf1b8af0ac (diff) |
make format
Diffstat (limited to 'game/QuitScript.cpp')
-rw-r--r-- | game/QuitScript.cpp | 9 |
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); }); |