Show active prebattle prep command
This commit is contained in:
@@ -28,7 +28,7 @@ Godot 4 tactical RPG prototype inspired by classic turn-based Romance of the Thr
|
|||||||
- Pre-battle Roster can move optional officers between sortie and reserve within scenario limits, using portrait rows, compact status badges, and hover details.
|
- Pre-battle Roster can move optional officers between sortie and reserve within scenario limits, using portrait rows, compact status badges, and hover details.
|
||||||
- Pre-battle Formation lets deployed officers swap starting positions inside scenario-defined cells, with portrait rows, coordinate badges, and hover placement instructions.
|
- Pre-battle Formation lets deployed officers swap starting positions inside scenario-defined cells, with portrait rows, coordinate badges, and hover placement instructions.
|
||||||
- Pre-battle briefing shows the campaign chapter, chapter battle number, location, victory/defeat summary, and first-clear reward preview.
|
- Pre-battle briefing shows the campaign chapter, chapter battle number, location, victory/defeat summary, and first-clear reward preview.
|
||||||
- Pre-battle prep commands use compact icon buttons with Korean hover labels for chapters, shop, talks, armory, roster, formation, and save records.
|
- Pre-battle prep commands use compact icon buttons with active selection state and Korean hover labels for chapters, shop, talks, armory, roster, formation, and save records.
|
||||||
- Pre-battle Chapters overview shows story-arc progress with map thumbnail rows, compact status badges, hover details, and can open completed or current battles.
|
- Pre-battle Chapters overview shows story-arc progress with map thumbnail rows, compact status badges, hover details, and can open completed or current battles.
|
||||||
- Pre-battle Save menu can write and load one manual campaign checkpoint separate from the automatic save, using compact seal-style slot rows and hover checkpoint details.
|
- Pre-battle Save menu can write and load one manual campaign checkpoint separate from the automatic save, using compact seal-style slot rows and hover checkpoint details.
|
||||||
- The title screen exposes Start, Load, and Settings, and Load now lets the player choose between the automatic record and the manual checkpoint.
|
- The title screen exposes Start, Load, and Settings, and Load now lets the player choose between the automatic record and the manual checkpoint.
|
||||||
|
|||||||
@@ -974,6 +974,7 @@ func _configure_prep_menu_button(button: Button, node_name: String, icon_kind: S
|
|||||||
button.tooltip_text = _format_local_command_tooltip(label, hint)
|
button.tooltip_text = _format_local_command_tooltip(label, hint)
|
||||||
button.custom_minimum_size = PREP_MENU_BUTTON_SIZE
|
button.custom_minimum_size = PREP_MENU_BUTTON_SIZE
|
||||||
button.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
|
button.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
|
||||||
|
button.toggle_mode = true
|
||||||
button.icon = _make_toolbar_icon(icon_kind)
|
button.icon = _make_toolbar_icon(icon_kind)
|
||||||
button.expand_icon = true
|
button.expand_icon = true
|
||||||
button.add_theme_font_size_override("font_size", 1)
|
button.add_theme_font_size_override("font_size", 1)
|
||||||
@@ -7449,6 +7450,7 @@ func _update_hud() -> void:
|
|||||||
_update_forecast()
|
_update_forecast()
|
||||||
_update_forecast_panel_visibility()
|
_update_forecast_panel_visibility()
|
||||||
_update_result_panel()
|
_update_result_panel()
|
||||||
|
_update_prep_menu_button_selection()
|
||||||
if inventory_label != null:
|
if inventory_label != null:
|
||||||
inventory_label.text = _format_inventory_status_summary_text()
|
inventory_label.text = _format_inventory_status_summary_text()
|
||||||
inventory_label.tooltip_text = _format_inventory_status_text()
|
inventory_label.tooltip_text = _format_inventory_status_text()
|
||||||
@@ -11452,6 +11454,24 @@ func _hide_save_menu() -> void:
|
|||||||
save_menu.visible = false
|
save_menu.visible = false
|
||||||
|
|
||||||
|
|
||||||
|
func _update_prep_menu_button_selection() -> void:
|
||||||
|
_set_prep_menu_button_pressed(chapter_button, chapter_menu)
|
||||||
|
_set_prep_menu_button_pressed(shop_button, shop_menu)
|
||||||
|
_set_prep_menu_button_pressed(talk_button, talk_menu)
|
||||||
|
_set_prep_menu_button_pressed(armory_button, armory_menu)
|
||||||
|
_set_prep_menu_button_pressed(roster_button, roster_menu)
|
||||||
|
_set_prep_menu_button_pressed(formation_button, formation_menu)
|
||||||
|
_set_prep_menu_button_pressed(save_button, save_menu)
|
||||||
|
|
||||||
|
|
||||||
|
func _set_prep_menu_button_pressed(button: Button, menu: Control) -> void:
|
||||||
|
if button == null:
|
||||||
|
return
|
||||||
|
var active := menu != null and menu.visible
|
||||||
|
button.set_pressed_no_signal(active)
|
||||||
|
button.set_meta("prep_menu_active", active)
|
||||||
|
|
||||||
|
|
||||||
func _rebuild_save_menu() -> void:
|
func _rebuild_save_menu() -> void:
|
||||||
if save_status_label != null:
|
if save_status_label != null:
|
||||||
save_status_label.text = "전기록 · 군막 봉인"
|
save_status_label.text = "전기록 · 군막 봉인"
|
||||||
|
|||||||
@@ -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.roster_button, "출진 명부", "unit_list")
|
||||||
_check_prep_menu_icon_button(failures, scene.formation_button, "진형 배치", "formation")
|
_check_prep_menu_icon_button(failures, scene.formation_button, "진형 배치", "formation")
|
||||||
_check_prep_menu_icon_button(failures, scene.save_button, "전기록", "save")
|
_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 != "사들이기":
|
if scene.shop_buy_button == null or scene.shop_buy_button.text != "사들이기":
|
||||||
failures.append("briefing shop buy button should avoid modern purchase wording")
|
failures.append("briefing shop buy button should avoid modern purchase wording")
|
||||||
if scene.shop_sell_button == null or scene.shop_sell_button.text != "내다팔기":
|
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:
|
if button == null:
|
||||||
failures.append("pre-battle prep button missing: %s" % expected_label)
|
failures.append("pre-battle prep button missing: %s" % expected_label)
|
||||||
return
|
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 != "":
|
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])
|
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:
|
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)])
|
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:
|
func _check_action_button_disabled_reasons(failures: Array[String]) -> void:
|
||||||
var scene = BattleSceneScript.new()
|
var scene = BattleSceneScript.new()
|
||||||
scene.wait_button = Button.new()
|
scene.wait_button = Button.new()
|
||||||
|
|||||||
Reference in New Issue
Block a user