lab menu
This commit is contained in:
parent
309bbcac5e
commit
c7788ed121
8 changed files with 100 additions and 32 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue