mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 12:29:18 +02:00
semaphores controllable on minimap
This commit is contained in:
16
uilayer.cpp
16
uilayer.cpp
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user