diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-03 13:34:27 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-03 13:34:27 +0100 |
commit | 2585dc3cab48ccad0cfa0c63354662d656c86c46 (patch) | |
tree | 579851837f35842e5ed682c912c470d68df79183 /mwe/events/src/loopManager.cpp | |
parent | 5deb950619dff9dde8b49520b23e3ce4001afbee (diff) |
`make format`
Diffstat (limited to 'mwe/events/src/loopManager.cpp')
-rw-r--r-- | mwe/events/src/loopManager.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/mwe/events/src/loopManager.cpp b/mwe/events/src/loopManager.cpp index f673d44..0b7d888 100644 --- a/mwe/events/src/loopManager.cpp +++ b/mwe/events/src/loopManager.cpp @@ -1,8 +1,8 @@ #include "loopManager.h" -LoopManager::LoopManager() - : inputSystem(std::make_unique<InputSystem>()){ - shutdownHandler = [this](const ShutDownEvent& event) { this->onShutdown(event); }; +LoopManager::LoopManager() : inputSystem(std::make_unique<InputSystem>()) { + shutdownHandler + = [this](const ShutDownEvent & event) { this->onShutdown(event); }; subscribe(shutdownHandler); } void LoopManager::processInput() { @@ -70,22 +70,20 @@ void LoopManager::setup() { } }; subscribe<KeyPressedEvent>(closeWindowCallback, false); - Button* testButton = new Button(200,200); - testButton->color = {100,0,100}; - testButton->onClick = []() { - std::cout << "Button was clicked" << std::endl; - }; + Button * testButton = new Button(200, 200); + testButton->color = {100, 0, 100}; + testButton->onClick + = []() { std::cout << "Button was clicked" << std::endl; }; testButton->x = 200; testButton->y = 200; inputSystem->registerButton(testButton); window.addUIObject(testButton); - - TextInput* testInput = new TextInput(200,200); + TextInput * testInput = new TextInput(200, 200); testInput->x = 100; testInput->y = 100; - testInput->backgroundColor = {20,50,80}; + testInput->backgroundColor = {20, 50, 80}; inputSystem->registerTextInput(testInput); window.addUIObject(testInput); } @@ -95,7 +93,7 @@ void LoopManager::render() { window.renderUIObjects(); } } -void LoopManager::onShutdown(const ShutDownEvent& e){ +void LoopManager::onShutdown(const ShutDownEvent & e) { this->gameRunning = false; } void LoopManager::update() { |