initial commit
This commit is contained in:
40
bin/layers/test_panel/test_panel.cpp
Executable file
40
bin/layers/test_panel/test_panel.cpp
Executable file
@@ -0,0 +1,40 @@
|
||||
#include "test_panel.hpp"
|
||||
#include "utils.hpp"
|
||||
|
||||
namespace sandbox
|
||||
{
|
||||
void test_panel::on_attach()
|
||||
{
|
||||
hack::log()("on_attach");
|
||||
|
||||
// set layer params
|
||||
// m_passport.m_name = "test_panel";
|
||||
m_passport.m_size = mt::vec2{ 600.f, 100.f };
|
||||
m_passport.m_pos = mt::vec2{ 100.f, 100.f };
|
||||
|
||||
// устанавливаем/убираем флаги отличные от установки по умолчанию
|
||||
// в данном примере убираем флаг
|
||||
m_window_flags &= ~ImGuiWindowFlags_NoTitleBar;
|
||||
}
|
||||
|
||||
void test_panel::on_detach()
|
||||
{
|
||||
hack::log()("on_attach");
|
||||
}
|
||||
|
||||
void test_panel::render()
|
||||
{
|
||||
begin();
|
||||
if (ImGui::Button("RUN", ImVec2(28, 30)))
|
||||
{
|
||||
VE::event e { test_event::TEST_EVEN , std::string("test event message") };
|
||||
execute(e);
|
||||
}
|
||||
end();
|
||||
}
|
||||
|
||||
void test_panel::on_event(VE::event e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user