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

@@ -1,7 +1,5 @@
#pragma once
#include "hack/security/uuid.hpp"
#include "event/event.hpp"
#include "gui/flags.hpp"
@@ -26,26 +24,8 @@ namespace VE
void set_event_fn(const event_fn<event&>& fn) { execute = fn; };
void begin()
{
ImGui::SetNextWindowPos(mt::convert<ImVec2>(m_passport.m_pos));
ImGui::SetNextWindowSize(mt::convert<ImVec2>(m_passport.m_size));
if (m_passport.m_name.empty())
m_passport.m_name = hack::security::generate_uuid();
if (!ImGui::Begin(m_passport.m_name.c_str(), &m_p_open, m_window_flags)) end();
}
void end() { ImGui::End(); }
protected:
event_fn<event&> execute;
struct passport
{
std::string m_name;
mt::vec2 m_pos;
mt::vec2 m_size;
} m_passport;
};
}