From 1d9b00c1bf743942fae0d42427438736200e09ea Mon Sep 17 00:00:00 2001 From: Wickedness Date: Sun, 21 Jun 2026 02:06:53 +0900 Subject: [PATCH] Simplify post-move command panels --- scripts/scenes/battle_scene.gd | 48 ++++++++++++++++++++-------------- tools/smoke_visual_assets.gd | 27 ++++++++----------- 2 files changed, 40 insertions(+), 35 deletions(-) diff --git a/scripts/scenes/battle_scene.gd b/scripts/scenes/battle_scene.gd index 2042141..50b4b76 100644 --- a/scripts/scenes/battle_scene.gd +++ b/scripts/scenes/battle_scene.gd @@ -241,16 +241,16 @@ 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(62, 42) -const LOCAL_COMMAND_CANCEL_BUTTON_SIZE := Vector2(244, 30) +const LOCAL_COMMAND_BUTTON_SIZE := Vector2(56, 40) +const LOCAL_COMMAND_CANCEL_BUTTON_SIZE := Vector2(242, 28) const LOCAL_COMMAND_HEADER_ICON_SIZE := Vector2(24, 24) -const POST_MOVE_MENU_SIZE := Vector2(292, 162) -const POST_MOVE_TITLE_SIZE := Vector2(126, 24) -const POST_MOVE_PICKER_PANEL_SIZE := Vector2(352, 238) -const POST_MOVE_PICKER_TITLE_SIZE := Vector2(312, 24) -const POST_MOVE_PICKER_DETAIL_SIZE := Vector2(312, 30) -const POST_MOVE_PICKER_SCROLL_SIZE := Vector2(312, 92) -const POST_MOVE_PICKER_OPTION_SIZE := Vector2(312, 46) +const POST_MOVE_MENU_SIZE := Vector2(260, 120) +const POST_MOVE_TITLE_SIZE := Vector2(242, 22) +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) +const POST_MOVE_PICKER_SCROLL_SIZE := Vector2(298, 88) +const POST_MOVE_PICKER_OPTION_SIZE := Vector2(298, 44) const POST_MOVE_PICKER_OPTION_ICON_MAX_WIDTH := 38 const POST_MOVE_PICKER_UTILITY_BUTTON_SIZE := Vector2(152, 30) const PICKER_UTILITY_ICON_MAX_WIDTH := 22 @@ -1469,10 +1469,11 @@ func _configure_picker_utility_button(button: Button, icon_kind: String, label: button.expand_icon = false button.icon_alignment = HORIZONTAL_ALIGNMENT_LEFT button.add_theme_constant_override("icon_max_width", PICKER_UTILITY_ICON_MAX_WIDTH) - button.add_theme_font_size_override("font_size", 12) + button.add_theme_font_size_override("font_size", 14) button.set_meta("command_icon", icon_kind) button.set_meta("command_label", label) button.set_meta("command_hint", detail) + button.set_meta("flat_readable_button", true) _apply_button_style(button) @@ -1593,12 +1594,14 @@ func _configure_local_command_button(button: Button, icon_kind: String, label: S button.expand_icon = false button.icon_alignment = HORIZONTAL_ALIGNMENT_LEFT button.add_theme_constant_override("icon_max_width", PICKER_UTILITY_ICON_MAX_WIDTH) - button.add_theme_font_size_override("font_size", 12) + button.add_theme_font_size_override("font_size", 14) button.set_meta("icon_only", icon_only) button.set_meta("command_icon", icon_kind) button.set_meta("command_label", label) button.set_meta("command_hint", hint) button.set_meta("command_hint_detail", detail) + button.set_meta("flat_readable_button", true) + _apply_button_style(button) button.mouse_entered.connect(_on_local_command_button_mouse_entered.bind(button)) button.mouse_exited.connect(_on_local_command_button_mouse_exited) @@ -4099,15 +4102,22 @@ func _create_hud() -> void: post_move_menu.mouse_filter = Control.MOUSE_FILTER_STOP post_move_menu.custom_minimum_size = POST_MOVE_MENU_SIZE post_move_menu.size = POST_MOVE_MENU_SIZE - _apply_panel_style(post_move_menu, "command_seal") + _apply_panel_style(post_move_menu, "hud_readable") root.add_child(post_move_menu) var post_move_column := VBoxContainer.new() - post_move_column.add_theme_constant_override("separation", 5) + post_move_column.add_theme_constant_override("separation", 6) post_move_menu.add_child(post_move_column) - post_move_column.add_child(_make_seal_ribbon(196, 10)) - post_move_column.add_child(_make_local_command_header("move", "행동 선택", "이동 후 수행할 행동을 고릅니다.")) + post_move_title_label = Label.new() + post_move_title_label.name = "LocalCommandHeaderTitle" + post_move_title_label.text = "행동 선택" + post_move_title_label.custom_minimum_size = POST_MOVE_TITLE_SIZE + post_move_title_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER + post_move_title_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER + post_move_title_label.tooltip_text = "이동 후 수행할 행동을 고릅니다." + _apply_label_style(post_move_title_label, UI_PARCHMENT_TEXT, LOCAL_COMMAND_TITLE_FONT_SIZE) + post_move_column.add_child(post_move_title_label) var post_move_grid := GridContainer.new() post_move_grid.name = "PostMoveCommandStrip" @@ -4186,13 +4196,12 @@ func _create_hud() -> void: post_move_picker_panel.mouse_filter = Control.MOUSE_FILTER_STOP post_move_picker_panel.custom_minimum_size = POST_MOVE_PICKER_PANEL_SIZE post_move_picker_panel.size = POST_MOVE_PICKER_PANEL_SIZE - _apply_panel_style(post_move_picker_panel, "command_seal") + _apply_panel_style(post_move_picker_panel, "hud_readable") root.add_child(post_move_picker_panel) var picker_column := VBoxContainer.new() - picker_column.add_theme_constant_override("separation", 5) + picker_column.add_theme_constant_override("separation", 6) post_move_picker_panel.add_child(picker_column) - picker_column.add_child(_make_seal_ribbon(296, 10)) post_move_picker_title_label = Label.new() post_move_picker_title_label.text = "행동 선택" @@ -4257,7 +4266,6 @@ func _create_hud() -> void: var targeting_column := VBoxContainer.new() targeting_column.add_theme_constant_override("separation", 4) targeting_hint_panel.add_child(targeting_column) - targeting_column.add_child(_make_seal_ribbon(218, 9)) targeting_hint_title_label = Label.new() targeting_hint_title_label.text = "적장 지목" @@ -18454,6 +18462,7 @@ func _make_post_move_tactic_option_button(skill_id: String, skill: Dictionary, d button.add_theme_constant_override("icon_max_width", POST_MOVE_PICKER_OPTION_ICON_MAX_WIDTH) button.set_meta("picker_icon", _post_move_tactic_icon_kind(skill)) button.set_meta("picker_label", skill_name) + button.set_meta("flat_readable_button", true) _apply_button_style(button) return button @@ -18475,6 +18484,7 @@ func _make_post_move_item_option_button(item_id: String, item: Dictionary, count button.add_theme_constant_override("icon_max_width", POST_MOVE_PICKER_OPTION_ICON_MAX_WIDTH) button.set_meta("picker_icon", "item") button.set_meta("picker_label", item_name) + button.set_meta("flat_readable_button", true) _apply_button_style(button) return button diff --git a/tools/smoke_visual_assets.gd b/tools/smoke_visual_assets.gd index 6b1abaa..d665005 100644 --- a/tools/smoke_visual_assets.gd +++ b/tools/smoke_visual_assets.gd @@ -4182,20 +4182,15 @@ 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 immediately readable action wording") - _check_panel_uses_generated_texture(failures, scene.post_move_menu, "post-move command generated frame") - var post_move_header: PanelContainer = null - var post_move_header_seal: PanelContainer = null - var post_move_header_icon: TextureRect = null + _check_panel_uses_flat_readable_backing(failures, scene.post_move_menu, "post-move command flat panel") + _check_panel_uses_flat_readable_backing(failures, scene.post_move_picker_panel, "post-move picker flat panel") if scene.post_move_menu != null: - post_move_header = scene.post_move_menu.find_child("LocalCommandHeader", true, false) as PanelContainer - post_move_header_seal = scene.post_move_menu.find_child("LocalCommandHeaderSeal", true, false) as PanelContainer - post_move_header_icon = scene.post_move_menu.find_child("LocalCommandHeaderIcon", true, false) as TextureRect - _check_panel_uses_generated_texture(failures, post_move_header, "post-move command generated header") - _check_panel_uses_generated_texture(failures, post_move_header_seal, "post-move command generated header seal") - if post_move_header_icon == null or post_move_header_icon.texture == null: - failures.append("post-move command header should show a generated move icon") - elif post_move_header_icon.texture.get_width() < 128 or post_move_header_icon.texture.get_height() < 128: - failures.append("post-move command header should use high-resolution generated move icon art") + if bool(scene.post_move_menu.get_meta("generated_panel_texture", false)): + failures.append("post-move command panel should not use a busy generated image") + if scene.post_move_menu.find_child("LocalCommandHeaderSeal", true, false) != null: + 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") @@ -4943,7 +4938,7 @@ func _check_local_command_icon_button(failures: Array[String], button: Button, e 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", ""))]) _check_button_uses_generated_toolbar_icon(failures, button, expected_label) - _check_button_uses_generated_surface(failures, button, expected_label) + _check_button_uses_flat_readable_surface(failures, button, expected_label) 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 str(button.tooltip_text).strip_edges().is_empty() or not str(button.tooltip_text).contains(expected_label): @@ -4961,7 +4956,7 @@ func _check_local_command_labeled_button(failures: Array[String], button: Button 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", ""))]) _check_button_uses_generated_toolbar_icon(failures, button, expected_label) - _check_button_uses_generated_surface(failures, button, expected_label) + _check_button_uses_flat_readable_surface(failures, button, expected_label) 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 str(button.tooltip_text).strip_edges().is_empty() or not str(button.tooltip_text).contains(expected_label): @@ -4979,7 +4974,7 @@ func _check_picker_utility_button(failures: Array[String], button: Button, expec if button.icon == null or str(button.get_meta("command_icon", "")) != expected_icon: failures.append("picker utility should carry a generated icon: %s icon=%s meta=%s" % [expected_label, str(button.icon), str(button.get_meta("command_icon", ""))]) _check_button_uses_generated_toolbar_icon(failures, button, expected_label) - _check_button_uses_generated_surface(failures, button, expected_label) + _check_button_uses_flat_readable_surface(failures, button, expected_label) if button.custom_minimum_size.x < minimum_size.x or button.custom_minimum_size.y < minimum_size.y: failures.append("picker utility should reserve readable button space: %s size=%s" % [expected_label, str(button.custom_minimum_size)]) if str(button.tooltip_text).strip_edges().is_empty() or not str(button.tooltip_text).contains(expected_label):