GUI: TableSetupScrollFreeze() for log view

This commit is contained in:
tildearrow 2022-04-11 02:45:02 -05:00
parent 283d74c32f
commit 7905b813e0

View file

@ -1,5 +1,6 @@
#include "gui.h" #include "gui.h"
#include "../ta-log.h" #include "../ta-log.h"
#include <imgui.h>
const char* logLevels[5]={ const char* logLevels[5]={
"ERROR", "ERROR",
@ -41,6 +42,8 @@ void FurnaceGUI::drawLog() {
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed,levelChars); ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed,levelChars);
ImGui::TableSetupColumn("c2",ImGuiTableColumnFlags_WidthStretch); ImGui::TableSetupColumn("c2",ImGuiTableColumnFlags_WidthStretch);
ImGui::TableSetupScrollFreeze(0,1);
ImGui::TableNextRow(ImGuiTableRowFlags_Headers); ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::TextUnformatted("time"); ImGui::TextUnformatted("time");