| 1842 | } |
| 1843 | |
| 1844 | void PyUILayout::popover(const std::string& panel_id, const std::string& text, const std::string& /*icon*/) { |
| 1845 | std::string btn_text = text.empty() ? panel_id : text; |
| 1846 | if (ImGui::Button(btn_text.c_str())) { |
| 1847 | ImGui::OpenPopup(panel_id.c_str()); |
| 1848 | } |
| 1849 | |
| 1850 | if (ImGui::BeginPopup(panel_id.c_str())) { |
| 1851 | vis::gui::PanelDrawContext ctx; |
| 1852 | ctx.scene = get_scene_for_python(); |
| 1853 | vis::gui::PanelRegistry::instance().draw_single_panel(panel_id, ctx); |
| 1854 | ImGui::EndPopup(); |
| 1855 | } |
| 1856 | } |
| 1857 | |
| 1858 | // PyUILayout implementation - Drawing (for viewport overlays) |
| 1859 | namespace { |
nothing calls this directly
no test coverage detected