Make post-move commands icon-first
This commit is contained in:
@@ -352,17 +352,21 @@ func _check_scene_post_move_blocked_command_labels(failures: Array[String]) -> v
|
||||
if scene.post_move_menu == null or not scene.post_move_menu.visible:
|
||||
failures.append("blocked command label setup should show the post-move menu")
|
||||
else:
|
||||
if scene.post_move_attack_button == null or not scene.post_move_attack_button.disabled or scene.post_move_attack_button.text != "타격 없음":
|
||||
failures.append("blocked attack command should explain itself through button text")
|
||||
if scene.post_move_tactic_button == null or not scene.post_move_tactic_button.disabled or scene.post_move_tactic_button.text != "책략 없음":
|
||||
failures.append("blocked tactic command should explain itself through button text")
|
||||
if scene.post_move_item_button == null or not scene.post_move_item_button.disabled or scene.post_move_item_button.text != "보급 없음":
|
||||
failures.append("blocked item command should explain itself through button text")
|
||||
if scene.post_move_attack_button == null or not scene.post_move_attack_button.disabled or scene.post_move_attack_button.text != "" or str(scene.post_move_attack_button.get_meta("disabled_hint", "")) != "타격 없음":
|
||||
failures.append("blocked attack command should explain itself through local hover metadata")
|
||||
if scene.post_move_tactic_button == null or not scene.post_move_tactic_button.disabled or scene.post_move_tactic_button.text != "" or str(scene.post_move_tactic_button.get_meta("disabled_hint", "")) != "책략 없음":
|
||||
failures.append("blocked tactic command should explain itself through local hover metadata")
|
||||
if scene.post_move_item_button == null or not scene.post_move_item_button.disabled or scene.post_move_item_button.text != "" or str(scene.post_move_item_button.get_meta("disabled_hint", "")) != "보급 없음":
|
||||
failures.append("blocked item command should explain itself through local hover metadata")
|
||||
_check_local_command_button_tooltips_suppressed(failures, [
|
||||
scene.post_move_attack_button,
|
||||
scene.post_move_tactic_button,
|
||||
scene.post_move_item_button
|
||||
], "blocked post-move commands")
|
||||
scene._on_local_command_button_mouse_entered(scene.post_move_attack_button)
|
||||
if scene.post_move_title_label == null or not scene.post_move_title_label.text.contains("타격 없음"):
|
||||
failures.append("blocked attack hover should surface disabled reason in the local title plate: %s" % scene.post_move_title_label.text)
|
||||
scene._on_local_command_button_mouse_exited()
|
||||
|
||||
scene.free()
|
||||
|
||||
@@ -409,8 +413,12 @@ func _check_scene_post_move_attack_targeting(failures: Array[String]) -> void:
|
||||
scene._handle_board_click(_screen_for_cell(Vector2i(2, 3)))
|
||||
if not scene._has_pending_move() or scene.post_move_menu == null or not scene.post_move_menu.visible:
|
||||
failures.append("attack targeting setup should leave the post-move menu visible")
|
||||
if scene.post_move_attack_button == null or scene.post_move_attack_button.disabled or scene.post_move_attack_button.text != "타격령":
|
||||
failures.append("available attack command should stay compact and enabled")
|
||||
if scene.post_move_attack_button == null or scene.post_move_attack_button.disabled or scene.post_move_attack_button.text != "" or str(scene.post_move_attack_button.get_meta("command_label", "")) != "타격령":
|
||||
failures.append("available attack command should stay icon-first and enabled")
|
||||
scene._on_local_command_button_mouse_entered(scene.post_move_attack_button)
|
||||
if scene.post_move_title_label == null or not scene.post_move_title_label.text.contains("타격령"):
|
||||
failures.append("available attack hover should explain the icon in the local title plate")
|
||||
scene._on_local_command_button_mouse_exited()
|
||||
if scene.basic_attack_targeting:
|
||||
failures.append("attack targeting should be off before pressing Attack")
|
||||
if not scene.attack_cells.is_empty():
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user