16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 11:19: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

View File

@@ -50,8 +50,15 @@ void ui_panel::render()
ImGui::SetNextWindowSizeConstraints(ImVec2(size_min.x, size_min.y), ImVec2(size_max.x, size_max.y));
auto const panelname{(title.empty() ? name : title) + "###" + name};
if (true == ImGui::Begin(panelname.c_str(), &is_open, flags))
if (ImGui::Begin(panelname.c_str(), &is_open, flags)) {
render_contents();
popups.remove_if([](std::unique_ptr<ui::popup> &popup)
{
return popup->render();
});
}
ImGui::End();
}
@@ -63,6 +70,11 @@ void ui_panel::render_contents()
}
}
void ui_panel::register_popup(std::unique_ptr<ui::popup> &&popup)
{
popups.push_back(std::move(popup));
}
void ui_expandable_panel::render_contents()
{
ImGui::Checkbox(LOC_STR(ui_expand), &is_expanded);
@@ -317,7 +329,7 @@ void ui_layer::render_panels()
void ui_layer::render_tooltip()
{
if (!m_cursorvisible || m_tooltip.empty())
if (!m_cursorvisible || m_imguiio->WantCaptureMouse || m_tooltip.empty())
return;
ImGui::BeginTooltip();