From 8f34829b1e4756472ce6889f31eb875ce343fb05 Mon Sep 17 00:00:00 2001 From: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com> Date: Wed, 12 Jan 2022 17:26:31 +0300 Subject: [PATCH] High score: rank starts from 1, table borders. --- SpaceCadetPinball/high_score.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/SpaceCadetPinball/high_score.cpp b/SpaceCadetPinball/high_score.cpp index 443c97e..819eefc 100644 --- a/SpaceCadetPinball/high_score.cpp +++ b/SpaceCadetPinball/high_score.cpp @@ -154,7 +154,7 @@ void high_score::RenderHighScoreDialog() bool unused_open = true; if (ImGui::BeginPopupModal("High Scores", &unused_open, ImGuiWindowFlags_AlwaysAutoResize)) { - if (ImGui::BeginTable("table1", 3, 0)) + if (ImGui::BeginTable("table1", 3, ImGuiTableFlags_Borders)) { char buf[36]; ImGui::TableSetupColumn("Rank"); @@ -166,7 +166,7 @@ void high_score::RenderHighScoreDialog() { ImGui::TableNextRow(); ImGui::TableNextColumn(); - snprintf(buf, sizeof buf, "%d", row); + snprintf(buf, sizeof buf, "%d", row + 1); ImGui::TextUnformatted(buf); auto currentRow = &dlg_hst[row + offset]; @@ -190,7 +190,6 @@ void high_score::RenderHighScoreDialog() } ImGui::EndTable(); } - ImGui::Separator(); if (ImGui::Button("Ok")) {