Make post-move commands icon-first

This commit is contained in:
2026-06-19 21:49:07 +09:00
parent 740f8b0e4f
commit de83b5cdd7
3 changed files with 151 additions and 50 deletions

View File

@@ -3269,16 +3269,11 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
failures.append("briefing shop sell button should avoid modern sale wording")
if scene.post_move_title_label == null or scene.post_move_title_label.text != "군령 선택":
failures.append("post-move command title should use order wording")
if scene.post_move_attack_button == null or scene.post_move_attack_button.text != "타격령":
failures.append("post-move attack button should use old order wording")
if scene.post_move_tactic_button == null or scene.post_move_tactic_button.text != "책략첩":
failures.append("post-move tactic button should use old slip wording")
if scene.post_move_item_button == null or scene.post_move_item_button.text != "보급첩":
failures.append("post-move item button should use old supply-slip wording")
if scene.post_move_wait_button == null or scene.post_move_wait_button.text != "대기령":
failures.append("post-move wait button should use old order wording")
if scene.post_move_cancel_button == null or scene.post_move_cancel_button.text != "발걸음 거두기":
failures.append("post-move cancel button should use recall step wording")
_check_local_command_icon_button(failures, scene.post_move_attack_button, "타격령", "attack")
_check_local_command_icon_button(failures, scene.post_move_tactic_button, "책략첩", "tactic")
_check_local_command_icon_button(failures, scene.post_move_item_button, "보급첩", "item")
_check_local_command_icon_button(failures, scene.post_move_wait_button, "대기령", "wait")
_check_local_command_icon_button(failures, scene.post_move_cancel_button, "발걸음 거두기", "cancel")
if scene.post_move_picker_back_button == null or scene.post_move_picker_back_button.text != "죽간 거두기":
failures.append("post-move picker back button should use bamboo-slip wording")
if scene.targeting_hint_title_label == null or scene.targeting_hint_title_label.text != "적장 지목":
@@ -3460,6 +3455,22 @@ func _find_descendant_by_name(root: Node, node_name: String) -> Node:
return null
func _check_local_command_icon_button(failures: Array[String], button: Button, expected_label: String, expected_icon: String) -> void:
if button == null:
failures.append("local command button missing: %s" % expected_label)
return
if not bool(button.get_meta("icon_only", false)) or button.text != "":
failures.append("local command 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:
failures.append("local command should carry an immediate visual icon: %s icon=%s meta=%s" % [expected_label, str(button.icon), str(button.get_meta("command_icon", ""))])
if str(button.get_meta("command_label", "")) != expected_label:
failures.append("local command should keep old wording in hover metadata: %s meta=%s" % [expected_label, str(button.get_meta("command_label", ""))])
if not str(button.tooltip_text).is_empty():
failures.append("local command should keep guidance in the local panel instead of native tooltip: %s" % expected_label)
if button.custom_minimum_size.x <= 0.0 or button.custom_minimum_size.y <= 0.0:
failures.append("local command should reserve stable icon space: %s" % expected_label)
func _check_hud_command_grid_layout(failures: Array[String]) -> void:
var scene = BattleSceneScript.new()
scene._create_hud()