remove passport

This commit is contained in:
chatlanin
2025-01-20 21:16:50 +03:00
parent 802b5a9a8d
commit 72e4b3b6a8
6 changed files with 41 additions and 60 deletions

View File

@@ -9,8 +9,6 @@ namespace sandbox
// set layer params
// m_passport.m_name = "test_panel";
m_passport.m_size = mt::vec2{ 400.f, 400.f };
m_passport.m_pos = mt::vec2{ 400.f, 400.f };
}
void test_panel_2::on_detach()
@@ -20,26 +18,30 @@ namespace sandbox
void test_panel_2::render()
{
begin();
if (ImGui::Button("RUN", ImVec2(28, 30)))
{
VE::event e { test_event::TEST_EVEN , std::string("test event message") };
execute(e);
}
ImGui::SetNextWindowPos(m_pos);
ImGui::SetNextWindowSize(m_size);
VE_PUSH_FONT(ICON, 18);
if (!ImGui::Begin("#test_panel_2", &m_p_open, m_window_flags)) ImGui::End();
if (ImGui::Button("RUN", ImVec2(28, 30)))
{
VE::event e { test_event::TEST_EVEN , std::string("test event message") };
execute(e);
}
if (ImGui::Button(VE::style::icon::ICON_STOP, ImVec2(28, 30)))
{
VE::event e { test_event::TEST_EVEN , std::string("test icon button") };
execute(e);
}
VE_PUSH_FONT(ICON, 18);
ImGui::Text(VE::style::icon::ICON_PAINT_BRUSH, " Paint" );
ImGui::Text("\xef\x87\xbc");
if (ImGui::Button(VE::style::icon::ICON_STOP, ImVec2(28, 30)))
{
VE::event e { test_event::TEST_EVEN , std::string("test icon button") };
execute(e);
}
VE_POP_FONT();
end();
ImGui::Text(VE::style::icon::ICON_PAINT_BRUSH, " Paint" );
ImGui::Text("\xef\x87\xbc");
VE_POP_FONT();
ImGui::End();
}
void test_panel_2::on_event(VE::event e)

View File

@@ -1,12 +1,15 @@
#pragma once
#include "VE.hpp" // IWYU pragma: keep
#include <VE.hpp>
namespace sandbox
{
class test_panel_2 : public VE::layer
{
VE_FN_OVERIDE();
ImVec2 m_size = ImVec2{ 400.f, 400.f };
ImVec2 m_pos = ImVec2{ 400.f, 400.f };
};
}