Remove the redundant return-to-study-modes button from exam results
Review Questions is the only action this screen needs - leaving via the sidebar already covers navigating elsewhere. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -45,7 +45,7 @@ func _render() -> void:
|
||||
content.add_child(_build_stats_row(dark, score))
|
||||
content.add_child(_build_disclaimer(dark, score))
|
||||
content.add_child(_build_category_card(dark, score))
|
||||
content.add_child(_build_actions(dark))
|
||||
content.add_child(_build_actions())
|
||||
|
||||
|
||||
func _build_hero_card(dark: bool, score: Dictionary) -> PanelContainer:
|
||||
@@ -219,7 +219,7 @@ func _category_row(dark: bool, category_name: String, value: Dictionary, index:
|
||||
return row
|
||||
|
||||
|
||||
func _build_actions(dark: bool) -> HBoxContainer:
|
||||
func _build_actions() -> HBoxContainer:
|
||||
var row := HBoxContainer.new()
|
||||
row.add_theme_constant_override("separation", 12)
|
||||
|
||||
@@ -231,24 +231,9 @@ func _build_actions(dark: bool) -> HBoxContainer:
|
||||
_style_gradient_button(review_button)
|
||||
review_button.pressed.connect(func(): main.show_screen("simulation_review", {"simulation": current_simulation, "return_screen": return_screen}))
|
||||
row.add_child(review_button)
|
||||
|
||||
var back_button := Button.new()
|
||||
back_button.text = "Return to simulation history" if return_screen == "simulation_history" else "Return to study modes"
|
||||
back_button.custom_minimum_size = Vector2(220, 52)
|
||||
back_button.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN
|
||||
_style_outline_button(back_button, dark)
|
||||
back_button.pressed.connect(_return_from_results)
|
||||
row.add_child(back_button)
|
||||
return row
|
||||
|
||||
|
||||
func _return_from_results() -> void:
|
||||
if return_screen == "simulation_history":
|
||||
main.show_screen("simulation_history", "preserve")
|
||||
else:
|
||||
main.show_screen("selection", "step3")
|
||||
|
||||
|
||||
func _card(dark: bool, child: Control, accent: Color = Brand.ROYAL_BLUE, active: bool = false) -> PanelContainer:
|
||||
var panel := PanelContainer.new()
|
||||
panel.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
@@ -292,14 +277,6 @@ func _style_gradient_button(button: Button) -> void:
|
||||
button.add_theme_color_override("font_hover_color", Color.WHITE)
|
||||
|
||||
|
||||
func _style_outline_button(button: Button, dark: bool) -> void:
|
||||
Brand.apply_font(button)
|
||||
button.add_theme_font_size_override("font_size", 14)
|
||||
for state in ["normal", "hover", "pressed"]:
|
||||
button.add_theme_stylebox_override(state, Brand.secondary_button_box(dark, state != "normal"))
|
||||
button.add_theme_color_override("font_color", Brand.text_color(dark))
|
||||
|
||||
|
||||
func _clear(container: Control) -> void:
|
||||
for child in container.get_children():
|
||||
container.remove_child(child)
|
||||
|
||||
Reference in New Issue
Block a user