MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / popover

Method popover

src/python/lfs/py_ui.cpp:1844–1856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 5

get_scene_for_pythonFunction · 0.85
instanceFunction · 0.85
c_strMethod · 0.80
draw_single_panelMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected