#include "test_panel_2.hpp" #include "utils.hpp" namespace sandbox { void test_panel_2::on_attach() { VE_CONNECT(test_panel_2, on_event); hack::log()("on_attach"); } void test_panel_2::render() { ImGui::SetNextWindowPos(m_pos); ImGui::SetNextWindowSize(m_size); if (!ImGui::Begin("#test_panel_2", &m_p_open, m_window_flags)) ImGui::End(); m_local_panel.render(); ImGui::End(); } void test_panel_2::on_event(VE::event e) { // для событий от перефирии // if (e.m_type.type() == typeid(VE::event_type)) // { // auto t = std::any_cast(e.m_type); // if (t != VE::event_type::MOUSE_CURSOR_POSITION) // hack::log()((int)t); // } if (e.m_type.type() == typeid(test_event)) { auto t = std::any_cast(e.m_type); if (t == test_event::TEST_EVEN) hack::log()(std::any_cast(e.m_data)); } } }