From 697eaaf7f91635c6b8a50d353977fb4648fd013e Mon Sep 17 00:00:00 2001 From: Wickedness Date: Sat, 20 Jun 2026 06:17:15 +0900 Subject: [PATCH] Use generated textures for seal ornaments --- README.md | 1 + scripts/scenes/battle_scene.gd | 45 ++++++++++++++-------------------- tools/smoke_visual_assets.gd | 14 +++++++++++ 3 files changed, 34 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 17ddbc6..ebe08f3 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ Godot 4 tactical RPG prototype inspired by classic turn-based Romance of the Thr - 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. - Post-move tactic and item pickers use generated command/item icons, compact two-line option rows, and hover details instead of dense single-line text. - Target preview badges, minimap hover badges, and battlefield target markers include generated jade panel surfaces plus action icons for move, attack, threat, support, objective, terrain, and item outcomes. +- Story, briefing, dialogue, and result ribbon ornaments use generated seal/panel textures instead of flat color boxes. - Battlefield hover info badges use generated jade panel texture plus terrain, supply, tactic, objective, and threat icons, keeping raw grid coordinates out of visible play text. - Battle, top-toolbar, and pre-battle command buttons now prefer generated high-resolution bronze/parchment icon art under `art/ui/icons` and generated lacquer/jade/cinnabar button surfaces under `art/ui/buttons`, with procedural icon drawing and flat button styles kept only as fallbacks. - Battle maps blend generated terrain texture tiles for plains, forests, hills, wasteland, roads, water, villages, and castles over the high-resolution battlefield backdrop, with generated transparent feature overlays for road connections, water, villages, castles, and wasteland accents. diff --git a/scripts/scenes/battle_scene.gd b/scripts/scenes/battle_scene.gd index 1737af4..1ec1d81 100644 --- a/scripts/scenes/battle_scene.gd +++ b/scripts/scenes/battle_scene.gd @@ -1920,11 +1920,19 @@ func _make_edict_title_strip(labels: Array, width: float = 0.0, height: float = return row -func _make_seal_tile(text: String, size: float = 24.0) -> PanelContainer: +func _make_generated_ornament_panel(node_name: String, size: Vector2, variant: String = "command_seal", expand_horizontal: bool = false) -> PanelContainer: var panel := PanelContainer.new() - panel.custom_minimum_size = Vector2(size, size) + panel.name = node_name + panel.custom_minimum_size = size panel.mouse_filter = Control.MOUSE_FILTER_IGNORE - panel.add_theme_stylebox_override("panel", _make_panel_style(UI_SEAL_RED_DARK, UI_OLD_BRONZE, 2, 8, 3, 0)) + if expand_horizontal: + panel.size_flags_horizontal = Control.SIZE_EXPAND_FILL + _apply_panel_style(panel, variant) + return panel + + +func _make_seal_tile(text: String, size: float = 24.0) -> PanelContainer: + var panel := _make_generated_ornament_panel("GeneratedSealTile", Vector2(size, size), "command_seal") var label := Label.new() label.text = text label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER @@ -1948,21 +1956,12 @@ func _make_seal_ribbon(width: float = 0.0, height: float = 18.0) -> HBoxContaine return row -func _make_lacquer_clasp(size: float) -> ColorRect: - var clasp := ColorRect.new() - clasp.color = UI_CINNABAR_DARK - clasp.custom_minimum_size = Vector2(size, size) - clasp.mouse_filter = Control.MOUSE_FILTER_IGNORE - return clasp +func _make_lacquer_clasp(size: float) -> PanelContainer: + return _make_generated_ornament_panel("GeneratedLacquerClasp", Vector2(size, size), "command_seal") -func _make_bronze_ribbon_strip(height: float) -> ColorRect: - var strip := ColorRect.new() - strip.color = Color(UI_TARNISHED_BRONZE.r, UI_TARNISHED_BRONZE.g, UI_TARNISHED_BRONZE.b, 0.92) - strip.custom_minimum_size = Vector2(12, height) - strip.size_flags_horizontal = Control.SIZE_EXPAND_FILL - strip.mouse_filter = Control.MOUSE_FILTER_IGNORE - return strip +func _make_bronze_ribbon_strip(height: float) -> PanelContainer: + return _make_generated_ornament_panel("GeneratedRibbonStrip", Vector2(12, height), "hud_info", true) func _make_seal_cluster(height: float) -> HBoxContainer: @@ -1970,10 +1969,8 @@ func _make_seal_cluster(height: float) -> HBoxContainer: cluster.custom_minimum_size = Vector2(height * 3.0 + 4.0, height) cluster.add_theme_constant_override("separation", 2) for index in range(3): - var tile := ColorRect.new() - tile.color = UI_CINNABAR if index == 1 else UI_CINNABAR_DARK - tile.custom_minimum_size = Vector2(height, height) - tile.mouse_filter = Control.MOUSE_FILTER_IGNORE + var tile := _make_generated_ornament_panel("GeneratedSealClusterTile%d" % (index + 1), Vector2(height, height), "command_seal") + tile.modulate = Color(1.0, 1.0, 1.0, 1.0) if index == 1 else Color(0.74, 0.70, 0.64, 0.96) cluster.add_child(tile) return cluster @@ -2249,12 +2246,8 @@ func _make_section_caption(text: String, width: float = 0.0) -> Control: return panel -func _make_seal_tick() -> ColorRect: - var tick := ColorRect.new() - tick.color = UI_CINNABAR - tick.custom_minimum_size = Vector2(18, 18) - tick.mouse_filter = Control.MOUSE_FILTER_IGNORE - return tick +func _make_seal_tick() -> PanelContainer: + return _make_generated_ornament_panel("GeneratedSealTick", Vector2(18, 18), "command_seal") func _make_bamboo_gutter(width: float = 18.0, height: float = 0.0) -> HBoxContainer: diff --git a/tools/smoke_visual_assets.gd b/tools/smoke_visual_assets.gd index b692621..f59b338 100644 --- a/tools/smoke_visual_assets.gd +++ b/tools/smoke_visual_assets.gd @@ -3659,6 +3659,12 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void: var seal_ribbon := scene._make_seal_ribbon(120, 18) _check_seal_ribbon(failures, seal_ribbon, "generated seal ribbon") seal_ribbon.free() + var seal_tile := scene._make_seal_tile("1", 24) + _check_panel_uses_generated_texture(failures, seal_tile, "numbered seal tile") + seal_tile.free() + var seal_tick := scene._make_seal_tick() + _check_panel_uses_generated_texture(failures, seal_tick, "section seal tick") + seal_tick.free() scene.free() @@ -3672,6 +3678,14 @@ func _check_seal_ribbon(failures: Array[String], ribbon: HBoxContainer, label: S var cluster := ribbon.get_child(2) as HBoxContainer if cluster == null or cluster.get_child_count() != 3: failures.append("%s should include a three-seal center cluster" % label) + for index in range(ribbon.get_child_count()): + var panel := ribbon.get_child(index) as PanelContainer + if index == 2: + continue + _check_panel_uses_generated_texture(failures, panel, "%s segment %d" % [label, index]) + if cluster != null: + for index in range(cluster.get_child_count()): + _check_panel_uses_generated_texture(failures, cluster.get_child(index) as PanelContainer, "%s center seal %d" % [label, index]) func _check_bamboo_gutter_row(failures: Array[String], panel: PanelContainer, label: String) -> void: