fix event func

This commit is contained in:
2025-03-15 12:33:59 +03:00
parent c555c47eb3
commit 3b64a8a337
7 changed files with 44 additions and 43 deletions

View File

@@ -5,7 +5,7 @@ namespace sandbox
{
void local_panel::on_attach()
{
VE_CONNECT(local_panel);
VE::CONNECT(this);
}
void local_panel::render()
@@ -15,8 +15,7 @@ namespace sandbox
{
auto f = []()
{
VE::event e { test_event::TEST_EVEN , std::string("test event message from thread") };
VE_EMIT(e);
VE::EMIT(test_event::TEST_EVEN, std::string("test event message from thread"));
};
std::thread th(f);
th.detach();
@@ -26,8 +25,7 @@ namespace sandbox
if (ImGui::Button(VE::style::icon::ICON_STOP, ImVec2(28, 30)))
{
VE::event e { test_event::TEST_EVEN , std::string("test icon button") };
VE_EMIT(e);
VE::EMIT(test_event::TEST_EVEN, std::string("test icon button"));
}
ImGui::Text(VE::style::icon::ICON_PAINT_BRUSH, " Paint" );