Move simulation history into profile
This commit is contained in:
@@ -18,6 +18,7 @@ var empty_label: Label
|
||||
var media_requests: Array[HTTPRequest] = []
|
||||
var image_overlay: Control
|
||||
var image_texture: TextureRect
|
||||
var return_screen := "selection"
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@@ -29,7 +30,7 @@ func _ready() -> void:
|
||||
var back := Button.new()
|
||||
back.text = "< Results"
|
||||
Style.style_chip(back, Style.CYAN)
|
||||
back.pressed.connect(func(): main.show_screen("simulation_results", simulation))
|
||||
back.pressed.connect(func(): main.show_screen("simulation_results", {"simulation": simulation, "return_screen": return_screen}))
|
||||
toolbar.add_child(back)
|
||||
progress_label = Label.new()
|
||||
progress_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
@@ -90,7 +91,9 @@ func _ready() -> void:
|
||||
|
||||
func on_show(payload: Variant = null) -> void:
|
||||
if typeof(payload) == TYPE_DICTIONARY:
|
||||
simulation = payload
|
||||
var wrapper: Dictionary = payload
|
||||
simulation = wrapper.get("simulation", wrapper)
|
||||
return_screen = str(wrapper.get("return_screen", "selection"))
|
||||
questions = simulation.get("reviewQuestions", [])
|
||||
responses.clear()
|
||||
for response in simulation.get("responses", []):
|
||||
|
||||
Reference in New Issue
Block a user