fix event

This commit is contained in:
2025-02-26 15:09:30 +03:00
parent 121d4af325
commit 7e419c9b79
12 changed files with 29 additions and 85 deletions

View File

@@ -5,21 +5,17 @@ namespace sandbox
{
void local_panel::on_attach()
{
hack::log()("on_attach");
}
void local_panel::on_detach()
{
VE_CONNECT(local_panel, on_event);
hack::log()("on_attach");
}
void local_panel::render()
{
if (ImGui::Button("RUN", ImVec2(28, 30)))
if (ImGui::Button("RUN 2", ImVec2(28, 30)))
{
VE::event e { "target_id", test_event::TEST_EVEN , std::string("test event message") };
execute(e);
EMIT(e);
}
VE_PUSH_FONT(ICON, 18);
@@ -27,7 +23,7 @@ namespace sandbox
if (ImGui::Button(VE::style::icon::ICON_STOP, ImVec2(28, 30)))
{
VE::event e { "target_id", test_event::TEST_EVEN , std::string("test icon button") };
execute(e);
EMIT(e);
}
ImGui::Text(VE::style::icon::ICON_PAINT_BRUSH, " Paint" );

View File

@@ -45,11 +45,7 @@ namespace sandbox
void opengl_panel::on_attach()
{
hack::log()("on_attach");
}
void opengl_panel::on_detach()
{
VE_CONNECT(opengl_panel, on_event);
hack::log()("on_attach");
}

View File

@@ -5,14 +5,10 @@ namespace sandbox
{
void test_panel::on_attach()
{
VE_CONNECT(test_panel, on_event);
hack::log()("on_attach", VE::application::get()->get_glfw()->width());
}
void test_panel::on_detach()
{
hack::log()("on_attach");
}
void test_panel::render()
{
ImGui::SetNextWindowPos(m_pos);
@@ -23,7 +19,7 @@ namespace sandbox
if (ImGui::Button("RUN", ImVec2(28, 30)))
{
VE::event e { "target_id", test_event::TEST_EVEN , std::string("test event message") };
execute(e);
EMIT(e);
}
ImGui::End();

View File

@@ -5,11 +5,7 @@ namespace sandbox
{
void test_panel_2::on_attach()
{
hack::log()("on_attach");
}
void test_panel_2::on_detach()
{
VE_CONNECT(test_panel_2, on_event);
hack::log()("on_attach");
}

View File

@@ -21,9 +21,6 @@ namespace sandbox
namespace VE
{
// HERE
// перенести в VE.hpp
// и сделать варитивными параметрами !!!
inline application& create()
{
static sandbox::test_app app{ "vertex_engine_sandbox" };