From eb9c76082d7d0ee0c3e55cb8eadfa5f8978bd8f2 Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Tue, 17 Dec 2024 20:12:30 +0100 Subject: button improvements --- src/test/InputTest.cpp | 59 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 21 deletions(-) (limited to 'src/test/InputTest.cpp') diff --git a/src/test/InputTest.cpp b/src/test/InputTest.cpp index 2d844d4..6c40235 100644 --- a/src/test/InputTest.cpp +++ b/src/test/InputTest.cpp @@ -2,7 +2,6 @@ #include #include - #define protected public #define private public @@ -214,8 +213,13 @@ TEST_F(InputTest, MouseClick) { TEST_F(InputTest, testButtonClick) { GameObject button_obj = mgr.new_object("body", "person", vec2{0, 0}, 0, 1); bool button_clicked = false; - std::function on_click = [&]() { button_clicked = true; }; - auto & button = button_obj.add_component