Show active prebattle prep command

This commit is contained in:
2026-06-20 01:03:02 +09:00
parent abeca3dbe3
commit 08325891f3
3 changed files with 43 additions and 1 deletions

View File

@@ -3412,6 +3412,9 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
_check_prep_menu_icon_button(failures, scene.roster_button, "출진 명부", "unit_list")
_check_prep_menu_icon_button(failures, scene.formation_button, "진형 배치", "formation")
_check_prep_menu_icon_button(failures, scene.save_button, "전기록", "save")
scene.briefing_panel.visible = true
scene.battle_started = false
_check_prep_menu_button_active_selection(failures, scene)
if scene.shop_buy_button == null or scene.shop_buy_button.text != "사들이기":
failures.append("briefing shop buy button should avoid modern purchase wording")
if scene.shop_sell_button == null or scene.shop_sell_button.text != "내다팔기":
@@ -3858,6 +3861,8 @@ func _check_prep_menu_icon_button(failures: Array[String], button: Button, expec
if button == null:
failures.append("pre-battle prep button missing: %s" % expected_label)
return
if not button.toggle_mode:
failures.append("pre-battle prep button should support active selected state: %s" % expected_label)
if not bool(button.get_meta("icon_only", false)) or button.text != "":
failures.append("pre-battle prep button should be icon-first without visible text: %s text=%s" % [expected_label, button.text])
if button.icon == null or str(button.get_meta("command_icon", "")) != expected_icon:
@@ -3868,6 +3873,23 @@ func _check_prep_menu_icon_button(failures: Array[String], button: Button, expec
failures.append("pre-battle prep button should expose its function through hover tooltip: %s tooltip=%s" % [expected_label, str(button.tooltip_text)])
func _check_prep_menu_button_active_selection(failures: Array[String], scene) -> void:
scene._on_shop_pressed()
if scene.shop_button == null or not scene.shop_button.button_pressed or not bool(scene.shop_button.get_meta("prep_menu_active", false)):
failures.append("opening the shop should mark only the shop prep icon active")
if scene.talk_button != null and scene.talk_button.button_pressed:
failures.append("opening the shop should leave the talk prep icon inactive")
scene._on_talk_pressed()
if scene.talk_button == null or not scene.talk_button.button_pressed or not bool(scene.talk_button.get_meta("prep_menu_active", false)):
failures.append("opening talk should mark the talk prep icon active")
if scene.shop_button != null and scene.shop_button.button_pressed:
failures.append("opening talk should clear the previous shop prep icon active state")
scene._hide_talk_menu()
scene._update_hud()
if scene.talk_button != null and scene.talk_button.button_pressed:
failures.append("hiding a prep menu should clear its active icon state")
func _check_action_button_disabled_reasons(failures: Array[String]) -> void:
var scene = BattleSceneScript.new()
scene.wait_button = Button.new()