Update LoggerWindow.cpp

This commit is contained in:
OusmBlueNinja 2025-01-04 23:27:06 -06:00
parent d373951d91
commit dd17ed8df5

View File

@ -132,13 +132,6 @@ void LoggerWindow::Show()
ImGui::BeginChild("LoggerScrollRegion", ImVec2(0, 0), false,
ImGuiWindowFlags_HorizontalScrollbar);
// Optional: tweak cell-padding or other style before beginning the table
// ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, ImVec2(4.0f, 4.0f));
// Begin the table with 2 columns
// - RowBg flag for striped rows
// - Borders for a neat grid
// - SizingFixedFit or SizingStretch can be chosen per preference
if (ImGui::BeginTable("LogTable", 2,
ImGuiTableFlags_SizingFixedFit |
ImGuiTableFlags_Borders |
@ -149,10 +142,7 @@ void LoggerWindow::Show()
ImGui::TableSetupColumn("Icon", ImGuiTableColumnFlags_WidthFixed, 30.0f);
ImGui::TableSetupColumn("Message", ImGuiTableColumnFlags_WidthStretch);
// If you want a header row (not strictly needed for a log)
// ImGui::TableHeadersRow();
// Loop over your log entries
// Loop over log entries
for (const auto &logEntry : m_Logs)
{
ImVec4 color = logEntry.color.value_or(GetDefaultColorForLevel(logEntry.level));