diff --git a/scripts/scenes/battle_scene.gd b/scripts/scenes/battle_scene.gd index 709d307..ea0f20e 100644 --- a/scripts/scenes/battle_scene.gd +++ b/scripts/scenes/battle_scene.gd @@ -245,11 +245,11 @@ const BATTLE_UNIT_LIST_BADGE_SIZE := Vector2(72, 22) const BATTLE_UNIT_LIST_BADGE_ICON_SIZE := Vector2(15, 15) const BATTLE_UNIT_LIST_HP_BAR_SIZE := Vector2(40, 7) const SETTINGS_PANEL_SIZE := Vector2(420, 414) -const LOCAL_COMMAND_BUTTON_SIZE := Vector2(56, 40) -const LOCAL_COMMAND_CANCEL_BUTTON_SIZE := Vector2(242, 28) +const LOCAL_COMMAND_BUTTON_SIZE := Vector2(42, 36) +const LOCAL_COMMAND_CANCEL_BUTTON_SIZE := Vector2(186, 26) const LOCAL_COMMAND_HEADER_ICON_SIZE := Vector2(24, 24) -const POST_MOVE_MENU_SIZE := Vector2(260, 120) -const POST_MOVE_TITLE_SIZE := Vector2(242, 22) +const POST_MOVE_MENU_SIZE := Vector2(206, 106) +const POST_MOVE_TITLE_SIZE := Vector2(186, 20) const POST_MOVE_PICKER_PANEL_SIZE := Vector2(334, 216) const POST_MOVE_PICKER_TITLE_SIZE := Vector2(298, 22) const POST_MOVE_PICKER_DETAIL_SIZE := Vector2(298, 28) @@ -4200,7 +4200,7 @@ func _create_hud() -> void: var post_move_grid := GridContainer.new() post_move_grid.name = "PostMoveCommandStrip" post_move_grid.columns = 4 - post_move_grid.add_theme_constant_override("h_separation", 6) + post_move_grid.add_theme_constant_override("h_separation", 4) post_move_grid.add_theme_constant_override("v_separation", 4) post_move_column.add_child(post_move_grid) @@ -4212,7 +4212,7 @@ func _create_hud() -> void: "적 선택", LOCAL_COMMAND_BUTTON_SIZE, "공격 가능한 적에게 붉은 표식이 뜹니다. 표식을 누르면 이동과 공격을 한 번에 끝냅니다.", - false + true ) post_move_attack_button.pressed.connect(_on_post_move_attack_pressed) post_move_grid.add_child(post_move_attack_button) @@ -4225,7 +4225,7 @@ func _create_hud() -> void: "책략 선택", LOCAL_COMMAND_BUTTON_SIZE, "쓸 책략을 고른 뒤 빛나는 표식 칸을 지목합니다.", - false + true ) post_move_tactic_button.pressed.connect(_on_post_move_tactic_pressed) post_move_grid.add_child(post_move_tactic_button) @@ -4238,7 +4238,7 @@ func _create_hud() -> void: "도구 선택", LOCAL_COMMAND_BUTTON_SIZE, "쓸 도구를 고른 뒤 회복이나 효과를 받을 부대를 지목합니다.", - false + true ) post_move_item_button.pressed.connect(_on_post_move_item_pressed) post_move_grid.add_child(post_move_item_button) @@ -4251,7 +4251,7 @@ func _create_hud() -> void: "행동 종료", LOCAL_COMMAND_BUTTON_SIZE, "이동한 자리에서 이 부대의 행동을 마칩니다.", - false + true ) post_move_wait_button.pressed.connect(_on_post_move_wait_pressed) post_move_grid.add_child(post_move_wait_button) diff --git a/tools/smoke_post_move_action_flow.gd b/tools/smoke_post_move_action_flow.gd index 0afc1c7..0916e72 100644 --- a/tools/smoke_post_move_action_flow.gd +++ b/tools/smoke_post_move_action_flow.gd @@ -218,14 +218,14 @@ func _check_scene_post_move_menu_flow(failures: Array[String]) -> void: if scene.post_move_menu == null or not scene.post_move_menu.visible: failures.append("post-move action menu should be visible after moving") else: - if BattleSceneScript.POST_MOVE_MENU_SIZE.y > 170.0: + if BattleSceneScript.POST_MOVE_MENU_SIZE.x > 220.0 or BattleSceneScript.POST_MOVE_MENU_SIZE.y > 115.0: failures.append("post-move action menu should stay compact around the unit: %s" % str(BattleSceneScript.POST_MOVE_MENU_SIZE)) var command_strip := scene.post_move_menu.find_child("PostMoveCommandStrip", true, false) as GridContainer if command_strip == null or command_strip.columns != 4: failures.append("post-move action menu should present four primary commands in one compact strip") if scene.post_move_cancel_button == null or scene.post_move_cancel_button.text != "이동 취소": failures.append("post-move cancel should remain a readable text command") - _check_visible_post_move_command_labels(failures, scene) + _check_compact_post_move_command_icons(failures, scene) _check_local_panel_position(failures, scene, scene.post_move_menu, Vector2i(2, 3), "post-move action menu") _check_local_command_button_tooltips_present(failures, [ scene.post_move_attack_button, @@ -516,11 +516,11 @@ 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 != "공격" or str(scene.post_move_attack_button.get_meta("disabled_hint", "")) != "공격 없음": + 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", "")) != "책략 없음": + 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", "")) != "도구 없음": + 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_present(failures, [ scene.post_move_attack_button, @@ -577,8 +577,8 @@ 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 != "공격" or str(scene.post_move_attack_button.get_meta("command_label", "")) != "공격": - failures.append("available attack command should stay readable and enabled") + if scene.post_move_attack_button == null or scene.post_move_attack_button.disabled or scene.post_move_attack_button.text != "" or not bool(scene.post_move_attack_button.get_meta("icon_only", false)) 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") @@ -1180,7 +1180,7 @@ func _check_local_command_button_tooltips_present(failures: Array[String], butto failures.append("%s should explain icon function through hover tooltip" % label) -func _check_visible_post_move_command_labels(failures: Array[String], scene) -> void: +func _check_compact_post_move_command_icons(failures: Array[String], scene) -> void: var expectations := [ {"button": scene.post_move_attack_button, "label": "공격"}, {"button": scene.post_move_tactic_button, "label": "책략"}, @@ -1191,12 +1191,12 @@ func _check_visible_post_move_command_labels(failures: Array[String], scene) -> var button: Button = expectation["button"] var label := str(expectation["label"]) if button == null: - failures.append("post-move command button missing visible label: %s" % label) + failures.append("post-move command button missing compact icon: %s" % label) continue - if button.text != label: - failures.append("post-move command should show readable text beside its icon: %s text=%s" % [label, button.text]) - if bool(button.get_meta("icon_only", false)): - failures.append("post-move command should not be icon-only once the unit has moved: %s" % label) + if button.text != "" or not bool(button.get_meta("icon_only", false)): + failures.append("post-move command should use icon-first buttons with hover text: %s text=%s" % [label, button.text]) + if str(button.tooltip_text).strip_edges().is_empty() or not str(button.tooltip_text).contains(label): + failures.append("post-move icon command should explain itself through hover tooltip: %s tooltip=%s" % [label, str(button.tooltip_text)]) func _feedback_contains(feedback: Array[String], needle: String) -> bool: diff --git a/tools/smoke_visual_assets.gd b/tools/smoke_visual_assets.gd index c6d0e87..f6b707a 100644 --- a/tools/smoke_visual_assets.gd +++ b/tools/smoke_visual_assets.gd @@ -4261,10 +4261,10 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void: failures.append("post-move command panel should not show decorative seal imagery") if scene.post_move_menu.find_child("GeneratedSealRibbon", true, false) != null: failures.append("post-move command panel should not show decorative ribbon imagery") - _check_local_command_labeled_button(failures, scene.post_move_attack_button, "공격", "attack") - _check_local_command_labeled_button(failures, scene.post_move_tactic_button, "책략", "tactic") - _check_local_command_labeled_button(failures, scene.post_move_item_button, "도구", "item") - _check_local_command_labeled_button(failures, scene.post_move_wait_button, "대기", "wait") + _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_picker_utility_button(failures, scene.post_move_cancel_button, "이동 취소", "cancel", BattleSceneScript.LOCAL_COMMAND_CANCEL_BUTTON_SIZE) 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 immediately readable wording")