mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 06:55:02 +01:00
27 lines
394 B
C++
27 lines
394 B
C++
#include "stdafx.h"
|
|
#include "widgets/popup.h"
|
|
|
|
ui::popup::popup(ui_panel &panel) : m_parent(panel) {}
|
|
|
|
ui::popup::~popup() {}
|
|
|
|
bool ui::popup::render()
|
|
{
|
|
if (!m_id.size())
|
|
{
|
|
m_id = "popup:" + std::to_string(id++);
|
|
ImGui::OpenPopup(m_id.c_str());
|
|
}
|
|
|
|
if (!ImGui::BeginPopup(m_id.c_str()))
|
|
return true;
|
|
|
|
render_content();
|
|
|
|
ImGui::EndPopup();
|
|
|
|
return false;
|
|
}
|
|
|
|
int ui::popup::id = 0;
|