This commit is contained in:
Rendo 2026-02-12 23:50:53 +05:00
commit e1e7c70147
39 changed files with 279 additions and 60 deletions

View file

@ -0,0 +1,30 @@
extends Control
var current: int = -1
func _ready() -> void:
for question in ReactionRegistry.current_lab.tests:
var options = question.options.duplicate()
options.shuffle()
var vbox = VBoxContainer.new()
var description = Label.new()
description.text = question.question
vbox.add_child(description)
vbox.visible = false
for option in options:
var button = Button.new()
button.text = option
vbox.add_child(button)
button.pressed.connect(next)
add_child(vbox)
next()
func _on_close_button_pressed() -> void:
get_parent().visible = false
func next() -> void:
get_child(current).visible = false
if current < get_child_count() - 1:
current += 1
get_child(current).visible = true