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:
29
widgets/popup.cpp
Normal file
29
widgets/popup.cpp
Normal 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;
|
||||
Reference in New Issue
Block a user