changes for ImGui

This commit is contained in:
2026-09-15 02:23:22 -07:00
parent 12a1e6eca9
commit 05fe3c2ee8
14 changed files with 593 additions and 6 deletions
@@ -0,0 +1,28 @@
#include "panel_registry_panel.hpp"
#include <imgui.h>
namespace sophia {
void PanelRegistryPanel::onUpdate(const FrameInfo&) {
ImGui::Begin("PanelRegistry");
ImGui::Text("%u panels (%u visible)", registry.size(),
registry.visibleCount());
ImGui::Separator();
for (std::string_view name : registry.names()) {
Panel* panel = registry.find(name);
if (!panel || panel == this) {
continue;
}
bool visible = panel->isVisible();
if (ImGui::Checkbox(name.data(), &visible)) {
panel->setVisible(visible);
}
}
ImGui::End();
}
} // namespace sophia