feat: add check to chosen answer
This commit is contained in:
parent
3272066a67
commit
4e8e33fe60
|
@ -28,6 +28,11 @@ internal class FullQuestion : IQuestion {
|
|||
/// </summary>
|
||||
public required ulong[] Responses { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The response given by the user, if any.
|
||||
/// </summary>
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue