add new implementation event
This commit is contained in:
@@ -6,14 +6,14 @@ namespace example
|
||||
{
|
||||
void ui_layer::on_attach()
|
||||
{
|
||||
VE::CONNECT(this);
|
||||
CONNECT(this);
|
||||
|
||||
hack::log()("on_attach");
|
||||
}
|
||||
|
||||
void ui_layer::on_detach()
|
||||
{
|
||||
VE::DISCONNECT(this);
|
||||
DISCONNECT();
|
||||
hack::log()("on_detach");
|
||||
}
|
||||
|
||||
@@ -26,20 +26,7 @@ namespace example
|
||||
|
||||
VE_PUSH_FONT(REGULAR, 20);
|
||||
if (ImGui::Button("Test signal", ImVec2(128, 130)))
|
||||
VE::EMIT(test_event::TEST_EVEN, std::string("test event message"), 1, "event MSG");
|
||||
|
||||
// try
|
||||
// {
|
||||
// if (ImGui::Button("Test signal log error", ImVec2(128, 130)))
|
||||
// VE::EMIT(test_event::TEST_EVEN, std::string("test event message"));
|
||||
// }
|
||||
// catch(hack::exception& e)
|
||||
// {
|
||||
// e.log();
|
||||
// auto data = std::any_cast<VE::event>(e.get_data());
|
||||
// hack::log()(data.m_id);
|
||||
// }
|
||||
|
||||
EMIT(test_event::TEST_EVEN, std::string("test event message"), 1);
|
||||
VE_POP_FONT();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user