From 89281f62fbb1ea6f60d525a55c6faa93a13b239d Mon Sep 17 00:00:00 2001 From: AyeZeeBB Date: Mon, 19 Oct 2026 17:04:13 -0500 Subject: [PATCH] Plugins: each card on a plugin's page opens and closes outside its widgets' ImGui IDs A card began inside one widget's PushID and ended inside the next card's, so ImGui reported PopID called too many times and missing. Cards now open and close between widgets, each with its own id. --- Extension/UI/Overlay/plugins_page.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Extension/UI/Overlay/plugins_page.cpp b/Extension/UI/Overlay/plugins_page.cpp index 611bbefa..1574c058 100644 --- a/Extension/UI/Overlay/plugins_page.cpp +++ b/Extension/UI/Overlay/plugins_page.cpp @@ -39,6 +39,14 @@ void draw_widgets(SkateMenu& menu, const plugin_ui::Panel& panel, double now) { } int item = 0; for (const auto& w : panel.widgets) { + // A card opens here and closes at the next one: outside any widget's own ID, each its own. + if (w.kind == plugin_ui::Widget::Kind::card) { + if (in_card) end_card(); + const auto id = "plugin-card-" + std::to_string(item++); + begin_card(menu, id.c_str(), w.text.c_str(), w.help.empty() ? nullptr : w.help.c_str()); + in_card = true; + continue; + } ImGui::PushID(item++); const auto key = panel.plugin + '\n' + panel.title + '\n' + w.id; auto& all = edits(); @@ -54,11 +62,7 @@ void draw_widgets(SkateMenu& menu, const plugin_ui::Panel& panel, double now) { const char* help = w.help.empty() ? "" : w.help.c_str(); using Kind = plugin_ui::Widget::Kind; switch (w.kind) { - case Kind::card: - if (in_card) end_card(); - begin_card(menu, "plugin-card", w.text.c_str(), w.help.empty() ? nullptr : w.help.c_str()); - in_card = true; - break; + case Kind::card: break; // above case Kind::tabs: { int selected = (edit != all.end() ? edit->second.chosen : w.chosen) - 1; if (edit != all.end() && edit->second.chosen == w.chosen) all.erase(edit);