aboutsummaryrefslogtreecommitdiff
path: root/src/example/button.cpp
diff options
context:
space:
mode:
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();