16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 17:09:19 +02:00

semaphores controllable on minimap

This commit is contained in:
milek7
2019-03-02 14:32:39 +01:00
parent 2d66192c9a
commit 1f0d8c4dc8
26 changed files with 678 additions and 315 deletions

29
widgets/popup.cpp Normal file
View File

@@ -0,0 +1,29 @@
#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;