aboutsummaryrefslogtreecommitdiff
path: root/src/example/button.cpp
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2025-01-03 19:39:23 +0100
committerJAROWMR <jarorutjes07@gmail.com>2025-01-03 19:39:23 +0100
commit4f687de3530fac052f30dac7b8c59dae103bcf81 (patch)
treeaf02b332b6a6efced3357834cc2f30fbfe7b223b /src/example/button.cpp
parentd65e0ff31a75230fd1c18eaeab9cb25ab2b9c82a (diff)
parent61148c757a1f742ff09e40e5347e74e638c7371c (diff)
merge
Diffstat (limited to 'src/example/button.cpp')
-rw-r--r--src/example/button.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/example/button.cpp b/src/example/button.cpp
index 4220588..ea7f528 100644
--- a/src/example/button.cpp
+++ b/src/example/button.cpp
@@ -21,14 +21,16 @@ using namespace std;
int main(int argc, char * argv[]) {
Mediator mediator;
- ComponentManager mgr{mediator};
- RenderSystem sys{mediator};
- EventManager event_mgr{mediator};
- InputSystem input_sys{mediator};
- SDLContext sdl_context{mediator};
- GameObject obj = mgr.new_object("camera", "camera", vec2{0, 0}, 0, 1);
+ ComponentManager mgr {mediator};
+ RenderSystem sys {mediator};
+ EventManager event_mgr {mediator};
+ InputSystem input_sys {mediator};
+ SDLContext sdl_context {mediator};
+ GameObject obj = mgr.new_object("camera", "camera", vec2 {0, 0}, 0, 1);
auto & camera = obj.add_component<Camera>(
- ivec2{500, 500}, vec2{500, 500}, Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f});
+ ivec2 {500, 500}, vec2 {500, 500},
+ Camera::Data {.bg_color = Color::WHITE, .zoom = 1.0f}
+ );
auto start = std::chrono::steady_clock::now();
while (true) {
const keyboard_state_t & keyboard_state = sdl_context.get_keyboard_state();