diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-03 19:39:23 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-03 19:39:23 +0100 |
commit | 4f687de3530fac052f30dac7b8c59dae103bcf81 (patch) | |
tree | af02b332b6a6efced3357834cc2f30fbfe7b223b /src/example/button.cpp | |
parent | d65e0ff31a75230fd1c18eaeab9cb25ab2b9c82a (diff) | |
parent | 61148c757a1f742ff09e40e5347e74e638c7371c (diff) |
merge
Diffstat (limited to 'src/example/button.cpp')
-rw-r--r-- | src/example/button.cpp | 16 |
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(); |