This commit is contained in:
rendo 2026-02-18 11:02:22 +05:00
commit c7788ed121
8 changed files with 100 additions and 32 deletions

View file

@ -16,7 +16,7 @@ func _ready() -> void:
button.text = options[i]
vbox.add_child(button)
button.pressed.connect(next)
button.pressed.connect(anwser.bind(i))
button.pressed.connect(anwser.bind(i,question.options.find(options[i]) == question.correct_anwser))
add_child(vbox)
next()
@ -32,5 +32,7 @@ func next() -> void:
else:
get_parent().visible = false
func anwser(option: int):
LabRuntime.anwsers.append(option)
func anwser(option_number: int,correctness: bool):
LabRuntime.anwsers.append(option_number)
LabRuntime.correctness.append(correctness)