From 4e8e33fe6019ca083f5ba3248a20be9c8e530066 Mon Sep 17 00:00:00 2001 From: Anna Date: Fri, 17 Nov 2023 13:25:30 -0500 Subject: [PATCH] feat: add check to chosen answer --- client/EorzeaVotes/Model/FullQuestion.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client/EorzeaVotes/Model/FullQuestion.cs b/client/EorzeaVotes/Model/FullQuestion.cs index 9a7ee3c..a679def 100644 --- a/client/EorzeaVotes/Model/FullQuestion.cs +++ b/client/EorzeaVotes/Model/FullQuestion.cs @@ -28,6 +28,11 @@ internal class FullQuestion : IQuestion { /// public required ulong[] Responses { get; init; } + /// + /// The response given by the user, if any. + /// + public required ushort? Response { get; init; } + internal void DrawResponses() { this.DrawTable(this.Responses); } @@ -50,7 +55,12 @@ internal class FullQuestion : IQuestion { for (var i = 0; i < responses.Length && i < this.Answers.Length; i++) { ImGui.TableNextRow(); ImGui.TableNextColumn(); - ImGui.TextUnformatted(this.Answers[i]); + var answer = this.Answers[i]; + if (this.Response == i) { + answer += " \u2713"; + } + + ImGui.TextUnformatted(answer); ImGui.TableNextColumn(); // ReSharper disable once PossiblyMistakenUseOfInterpolatedStringInsert