Files
Towards/modules/client/src/debug/DebugWindow.cpp
T

27 lines
481 B
C++
Raw Normal View History

2026-07-22 17:34:44 +02:00
#include "DebugWindow.hpp"
#include <imgui.h>
#include <utility>
namespace tw::dbg {
DebugWindow::DebugWindow(std::string id, std::string title, std::string category)
: m_id(std::move(id)),
m_title(std::move(title)),
m_category(std::move(category)),
m_label(m_title + "##" + m_id)
{
}
void DebugWindow::draw() {
if(!m_open) {
return;
}
if(ImGui::Begin(m_label.c_str(), &m_open)) {
draw_contents();
}
ImGui::End();
}
}