Refine question toolbar icons and pause menu

This commit is contained in:
hz
2026-07-18 15:37:05 -05:00
parent eb8747d48e
commit 8c349314ad
24 changed files with 174 additions and 139 deletions
+7 -12
View File
@@ -345,18 +345,13 @@ func _test_player_runtime_construction() -> void:
_assert(player.navigator_popup != null, "question player should construct its popup navigator")
_assert(player.header_row.get_node_or_null("StepBadge") == null, "question player should not display a redundant STEP 3 badge")
_assert(player.header_row.get_child(0) == player.progress_button, "question progress should be the first header item")
var clear_box := player.clear_highlight_button.get_theme_stylebox("normal") as StyleBoxTexture
var report_box := player.report_button.get_theme_stylebox("normal") as StyleBoxTexture
var labs_box := player.labs_button.get_theme_stylebox("normal") as StyleBoxTexture
_assert(clear_box != null and clear_box.texture != null, "clear highlights should use the supplied toolbar artwork")
_assert(report_box != null and report_box.texture != null, "report question should use the supplied toolbar artwork")
_assert(labs_box != null and labs_box.texture != null, "lab results should use the supplied toolbar artwork")
player._style_asset_toolbar_button(player.clear_highlight_button, player.CLEAR_HIGHLIGHT_LIGHT_ICON)
clear_box = player.clear_highlight_button.get_theme_stylebox("normal") as StyleBoxTexture
_assert(clear_box.texture == player.CLEAR_HIGHLIGHT_LIGHT_ICON, "clear highlights should support its light-mode artwork")
player._style_asset_toolbar_button(player.report_button, player.REPORT_QUESTION_LIGHT_ICON)
report_box = player.report_button.get_theme_stylebox("normal") as StyleBoxTexture
_assert(report_box.texture == player.REPORT_QUESTION_LIGHT_ICON, "report question should support its light-mode artwork")
_assert(player.clear_highlight_button.icon != null, "clear highlights should use the supplied toolbar artwork")
_assert(player.report_button.icon != null, "report question should use the supplied toolbar artwork")
_assert(player.labs_button.icon != null, "lab results should use the supplied toolbar artwork")
player._style_asset_toolbar_button(player.clear_highlight_button, player.CLEAR_HIGHLIGHT_LIGHT_ICON, false)
_assert(player.clear_highlight_button.icon == player.CLEAR_HIGHLIGHT_LIGHT_ICON, "clear highlights should support its light-mode artwork")
player._style_asset_toolbar_button(player.report_button, player.REPORT_QUESTION_LIGHT_ICON, false)
_assert(player.report_button.icon == player.REPORT_QUESTION_LIGHT_ICON, "report question should support its light-mode artwork")
var toggle_box := player.theme_button.get_theme_stylebox("normal") as StyleBoxFlat
_assert(player.theme_button.custom_minimum_size == Vector2(44, 44), "question theme toggle should retain the shared square footprint")
_assert(toggle_box != null and toggle_box.corner_radius_top_left == 22, "question theme toggle should use the shared circular treatment")
+5
View File
@@ -48,6 +48,11 @@ func _run() -> void:
_assert(main_screen.theme_button.get_index() < main_screen.account_button.get_index(), "the theme toggle should appear before the account dropdown")
_assert(main_screen.account_chevron_button.get_index() == main_screen.account_button.get_index() + 1, "the account avatar and chevron should remain adjacent")
_assert(main_screen.header_panel.find_child("HeaderStats", true, false) == null, "the application header should not display rating or role labels")
var pause_menu_has_profile := false
for menu_button in main_screen.app_menu.find_children("*", "Button", true, false):
if menu_button.text == "Profile":
pause_menu_has_profile = true
_assert(not pause_menu_has_profile, "the paused-run menu should not duplicate profile navigation")
_assert(not main_screen.account_chevron_button.visible, "nonessential account controls should collapse on phone-width headers")
var question_bank_nav := main_screen.sidebar.find_child("NavQuestionBank", true, false) as Button
_assert(question_bank_nav != null and question_bank_nav.text == "Question Bank", "the Practice navigation item should be replaced by Question Bank")