diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-04 11:54:41 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-04 11:54:41 +0100 |
commit | 7fdbeb058bc85aaafd5f424687a4ae43e796d8e3 (patch) | |
tree | 8b5d5e888fe56cb4466741c6fde29c15cc900b15 /src/example/button.cpp | |
parent | 904ef57f4ee2b34aeeb9e027c09de5e025b72d8a (diff) |
if button outside viewport fix
Diffstat (limited to 'src/example/button.cpp')
-rw-r--r-- | src/example/button.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/example/button.cpp b/src/example/button.cpp index d74f781..be236ec 100644 --- a/src/example/button.cpp +++ b/src/example/button.cpp @@ -26,9 +26,9 @@ int main(int argc, char * argv[]) { InputSystem input_sys{mgr}; AnimatorSystem asys{mgr}; GameObject camera_obj = mgr.new_object("", "", vec2{0, 0}, 0, 1); - camera_obj.add_component<Camera>(Color::WHITE, ivec2{1080, 720}, vec2{2000, 2000}, 1.0f); + camera_obj.add_component<Camera>(Color::WHITE, ivec2{720, 1080}, vec2{2000, 2000}, 1.0f); - GameObject button_obj = mgr.new_object("body", "person", vec2{0, 0}, 0, 1); + GameObject button_obj = mgr.new_object("body", "person", vec2{0, -1000}, 0, 1); auto s2 = Texture("asset/texture/test_ap43.png"); bool button_clicked = false; auto & sprite2 = button_obj.add_component<Sprite>( |