Use generated textures for seal ornaments

This commit is contained in:
2026-06-20 06:17:15 +09:00
parent d7d5d77985
commit 697eaaf7f9
3 changed files with 34 additions and 26 deletions

View File

@@ -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: