remove func name from def

This commit is contained in:
2025-02-26 15:15:58 +03:00
parent 1d823dbd87
commit 2e3b6e3dae
5 changed files with 7 additions and 5 deletions

View File

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

View File

@@ -43,9 +43,11 @@ namespace sandbox
void cube::render() { buffer::render(); } void cube::render() { buffer::render(); }
// OPENGL_PANEL_LAYER
void opengl_panel::on_attach() void opengl_panel::on_attach()
{ {
VE_CONNECT(opengl_panel, on_event); VE_CONNECT(opengl_panel);
hack::log()("on_attach"); hack::log()("on_attach");
} }

View File

@@ -5,7 +5,7 @@ namespace sandbox
{ {
void test_panel::on_attach() void test_panel::on_attach()
{ {
VE_CONNECT(test_panel, on_event); VE_CONNECT(test_panel);
hack::log()("on_attach", VE::application::get()->get_glfw()->width()); hack::log()("on_attach", VE::application::get()->get_glfw()->width());
} }

View File

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

View File

@@ -9,7 +9,7 @@
void render() override;\ void render() override;\
void on_event(VE::event e) override void on_event(VE::event e) override
#define VE_CONNECT(DEF_CLASS, DEF_FUNCTION) VE::event_manager::instance().connect(std::bind(&DEF_CLASS::DEF_FUNCTION, this, std::placeholders::_1)); #define VE_CONNECT(DEF_CLASS) VE::event_manager::instance().connect(std::bind(&DEF_CLASS::on_event, this, std::placeholders::_1));
#define VE_EMIT(e) VE::event_manager::instance().emit(e) #define VE_EMIT(e) VE::event_manager::instance().emit(e)
#define VE_PUSH_FONT(def_font, def_size)\ #define VE_PUSH_FONT(def_font, def_size)\