From f51ddfac7b8948a43a40894185238c8a1ceeb5c4 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 15 Nov 2024 17:25:12 +0100 Subject: wrap lines at column 95 instead of 80 --- mwe/events/src/loopManager.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'mwe/events/src/loopManager.cpp') diff --git a/mwe/events/src/loopManager.cpp b/mwe/events/src/loopManager.cpp index 0b7d888..c58a5e7 100644 --- a/mwe/events/src/loopManager.cpp +++ b/mwe/events/src/loopManager.cpp @@ -1,8 +1,7 @@ #include "loopManager.h" LoopManager::LoopManager() : inputSystem(std::make_unique()) { - shutdownHandler - = [this](const ShutDownEvent & event) { this->onShutdown(event); }; + shutdownHandler = [this](const ShutDownEvent & event) { this->onShutdown(event); }; subscribe(shutdownHandler); } void LoopManager::processInput() { @@ -63,17 +62,15 @@ void LoopManager::setup() { subscribe(callback, false); EventHandler mouseCallback = onMouse; subscribe(mouseCallback, false); - EventHandler closeWindowCallback - = [this](const KeyPressedEvent & e) { - if (e.getKeyCode() == Escape) { - this->setRunning(false); - } - }; + EventHandler closeWindowCallback = [this](const KeyPressedEvent & e) { + if (e.getKeyCode() == Escape) { + this->setRunning(false); + } + }; subscribe(closeWindowCallback, false); Button * testButton = new Button(200, 200); testButton->color = {100, 0, 100}; - testButton->onClick - = []() { std::cout << "Button was clicked" << std::endl; }; + testButton->onClick = []() { std::cout << "Button was clicked" << std::endl; }; testButton->x = 200; testButton->y = 200; inputSystem->registerButton(testButton); @@ -93,9 +90,7 @@ void LoopManager::render() { window.renderUIObjects(); } } -void LoopManager::onShutdown(const ShutDownEvent & e) { - this->gameRunning = false; -} +void LoopManager::onShutdown(const ShutDownEvent & e) { this->gameRunning = false; } void LoopManager::update() { //fprintf(stderr, "**********normal update********** \n"); LoopTimer & timer = LoopTimer::getInstance(); -- cgit v1.2.3