Encapsulate BeginTable for item and check tracker settings windows. (#5778)

This commit is contained in:
Malkierian
2025-09-08 20:44:27 -07:00
committed by GitHub
parent 405fc7a31d
commit 837f497ea6
2 changed files with 221 additions and 220 deletions

View File

@@ -2199,9 +2199,9 @@ void CheckTrackerSettingsWindow::DrawElement() {
"Checks that you saved the game while having collected.", THEME_COLOR); "Checks that you saved the game while having collected.", THEME_COLOR);
ImGui::PopStyleVar(1); ImGui::PopStyleVar(1);
}
ImGui::EndTable(); ImGui::EndTable();
} }
}
void CheckTrackerWindow::InitElement() { void CheckTrackerWindow::InitElement() {
SaveManager::Instance->AddInitFunction(InitTrackerData); SaveManager::Instance->AddInitFunction(InitTrackerData);

View File

@@ -1713,7 +1713,7 @@ static std::unordered_map<int32_t, const char*> minimalDisplayTypes = {
void ItemTrackerSettingsWindow::DrawElement() { void ItemTrackerSettingsWindow::DrawElement() {
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, { 8.0f, 8.0f }); ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, { 8.0f, 8.0f });
ImGui::BeginTable("itemTrackerSettingsTable", 2, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV); if (ImGui::BeginTable("itemTrackerSettingsTable", 2, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
ImGui::TableSetupColumn("General settings", ImGuiTableColumnFlags_WidthStretch, 200.0f); ImGui::TableSetupColumn("General settings", ImGuiTableColumnFlags_WidthStretch, 200.0f);
ImGui::TableSetupColumn("Section settings", ImGuiTableColumnFlags_WidthStretch, 200.0f); ImGui::TableSetupColumn("Section settings", ImGuiTableColumnFlags_WidthStretch, 200.0f);
ImGui::TableHeadersRow(); ImGui::TableHeadersRow();
@@ -1968,6 +1968,7 @@ void ItemTrackerSettingsWindow::DrawElement() {
ImGui::PopStyleVar(1); ImGui::PopStyleVar(1);
ImGui::EndTable(); ImGui::EndTable();
} }
}
void ItemTrackerWindow::InitElement() { void ItemTrackerWindow::InitElement() {
// Crashes when the itemTrackerNotes is empty, so add an empty character to it // Crashes when the itemTrackerNotes is empty, so add an empty character to it