diff --git a/src/sandbox/layers/test_panel/test_panel.cpp b/src/sandbox/layers/test_panel/test_panel.cpp index db44612..fe0533d 100644 --- a/src/sandbox/layers/test_panel/test_panel.cpp +++ b/src/sandbox/layers/test_panel/test_panel.cpp @@ -24,7 +24,9 @@ namespace tr::layers ImFont* font = try_engine::style::fonts::get_font(font_type::ICON, 18); ImGui::PushFont(font); - if (ImGui::Button(try_engine::style::icon::ICON_STOP, ImVec2(28, 30))) {} + if (ImGui::Button(try_engine::style::icon::ICON_STOP, ImVec2(28, 30))) { + em->execute(std::string("asdf"), "asdf"); + } // ImGui::Text(try_engine::style::icon::ICON_PAINT_BRUSH " Paint" ); ImGui::Text("\xef\x87\xbc"); @@ -47,6 +49,8 @@ namespace tr::layers void test_panel::on_event(std::any e, std::any value) { + auto b = std::any_cast(e); + hack::log()(b); } void test_panel::on_update(time t) diff --git a/src/try_engine/event/app_event/event.hpp b/src/try_engine/event/app_event/event.hpp index de63065..4857903 100644 --- a/src/try_engine/event/app_event/event.hpp +++ b/src/try_engine/event/app_event/event.hpp @@ -21,7 +21,7 @@ namespace try_engine::app_event for (const auto layer : l_stack) { std::thread th { - [&]() { + [=]() { layer->on_event(type, value); } };