feat(ui): visual-language candidate - quiet rows, framed surfaces, skill-bar material

Reduce the stacked-rectangle look without touching behaviour. Repeated roster,
route and side-ledger rows become translucent quiet bands with a single accent
rule; the few real surfaces reuse the existing pixel nine-slice as material;
the battle skill bar reuses the stage nine-slice. Touch areas, routes, text,
economy, save and CH data are unchanged. No new art dependency.

Evidence: 10 real before/after shots, 48-shot UI slice PASS, touch/scroll/
modal/battle-exit regressions PASS, strict Godot import clean.
This commit is contained in:
2026-11-29 10:16:02 +08:00
parent c8074948b6
commit 87ea67c91e
5 changed files with 75 additions and 18 deletions
+3 -1
View File
@@ -1021,7 +1021,9 @@ func _refresh_ch_bounties() -> void:
func _add_side_row(text: String, button_text: String, enabled: bool, callback: Callable) -> void:
var panel := UiTheme.make_panel()
# Ledger entries are quiet bands, not stacked cards: the pixel scene stays
# visible and the claim action remains the only loud mark on each row.
var panel := UiTheme.make_quiet_row()
_side_rows.add_child(panel)
var margin := MarginContainer.new()
margin.add_theme_constant_override("margin_left", 12)
@@ -26,7 +26,7 @@ func build(p_locale: String, p_reduced: bool) -> void:
size_flags_vertical = Control.SIZE_EXPAND_FILL
mouse_filter = Control.MOUSE_FILTER_STOP # flow page intercepts lower input
_card = UiTheme.glass_panel(0.96)
_card = UiTheme.make_surface_panel(0.94)
_card.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
_card.offset_left = 16
_card.offset_right = -16
+8 -5
View File
@@ -51,8 +51,9 @@ func build(p_locale: String, p_reduced: bool) -> void:
note.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
column.add_child(note)
# Offline report: glass card floating over the scene, with a secondary chip.
var report := UiTheme.glass_panel(0.80)
# Offline report: one of the few material surfaces, framed with the existing
# pixel nine-slice instead of another flat glass rectangle.
var report := UiTheme.make_surface_panel(0.78)
column.add_child(report)
var report_margin := MarginContainer.new()
report_margin.add_theme_constant_override("margin_left", 10)
@@ -98,7 +99,9 @@ func build(p_locale: String, p_reduced: bool) -> void:
tap_targets["skyport_building_%d" % i] = tile
# Training roster: signature icon per hero, no duplicated full-width links.
column.add_child(UiTheme.make_label(UiText.t("shell.training.title", locale), 16, UiTheme.COLOR_BORDER))
# A caption with a short brass rule carries section hierarchy; the rows
# below are quiet bands so the roster does not become four stacked cards.
column.add_child(UiTheme.make_section_caption(UiText.t("shell.training.title", locale), 16))
var signatures := [
"res://assets/icons/icon_tempo_bolt.png",
"res://assets/icons/icon_sustain_leaf.png",
@@ -106,7 +109,7 @@ func build(p_locale: String, p_reduced: bool) -> void:
]
for i in range(3):
var hero_id := "H%02d" % (i + 1)
var card := UiTheme.glass_panel(0.82)
var card := UiTheme.make_quiet_row(UiTheme.COLOR_MINT)
column.add_child(card)
var box := MarginContainer.new()
box.add_theme_constant_override("margin_left", 10)
@@ -147,7 +150,7 @@ func build(p_locale: String, p_reduced: bool) -> void:
add_child(toggle)
tap_targets["skyport_more_toggle"] = toggle
drawer = UiTheme.glass_panel(0.94)
drawer = UiTheme.make_surface_panel(0.94)
drawer.set_anchors_and_offsets_preset(Control.PRESET_TOP_RIGHT)
drawer.offset_left = -230
drawer.offset_top = 58
+3 -3
View File
@@ -125,7 +125,7 @@ func build(p_locale: String, p_reduced: bool) -> void:
_tokens[node_id] = token
_route_children.append(token)
var label_row := UiTheme.glass_panel(0.78)
var label_row := UiTheme.make_quiet_row()
column.add_child(label_row)
_route_children.append(label_row)
var label_box := MarginContainer.new()
@@ -142,7 +142,7 @@ func build(p_locale: String, p_reduced: bool) -> void:
_route_children.append(segment)
# Detail card is pinned above the dock and never scrolls away.
detail = UiTheme.glass_panel(0.94)
detail = UiTheme.make_surface_panel(0.92)
detail.set_anchors_and_offsets_preset(Control.PRESET_BOTTOM_WIDE)
detail.offset_left = 12
detail.offset_right = -12
@@ -313,7 +313,7 @@ func _rebuild_route(nodes: Array) -> void:
_route_children.append(token)
tap_targets["world_node_%s" % nid] = token
_tokens[nid] = token
var label_row := UiTheme.glass_panel(0.78)
var label_row := UiTheme.make_quiet_row()
_column.add_child(label_row)
_route_children.append(label_row)
var box := MarginContainer.new()
+60 -8
View File
@@ -110,6 +110,48 @@ static func underline_style(active: bool, accent: Color = COLOR_BORDER) -> Style
return style
## Quiet list entry. Repeated rows (roster, route, side ledger) are the main
## source of the "stacked dark rectangles" look: a single translucent band and
## one left accent rule keep the text legible while the pixel scene shows
## through. There is no closed border, so a row never reads as a generic card.
static func quiet_row_style(accent: Color = Color(0.62, 0.50, 0.30, 0.82)) -> StyleBoxFlat:
var style := flat_style(Color(0.03, 0.07, 0.12, 0.46))
style.border_color = accent
style.set_border_width(SIDE_LEFT, 2)
style.content_margin_left = 10
style.content_margin_right = 10
style.content_margin_top = 6
style.content_margin_bottom = 6
return style
## Panel wrapper for quiet rows. MOUSE_FILTER_PASS keeps drags bubbling to the
## ScrollContainer and never widens a touch target; only the chrome changes.
static func make_quiet_row(accent: Color = Color(0.62, 0.50, 0.30, 0.82)) -> PanelContainer:
var panel := PanelContainer.new()
panel.add_theme_stylebox_override("panel", quiet_row_style(accent))
panel.mouse_filter = Control.MOUSE_FILTER_PASS
return panel
## A section caption carries hierarchy with type + a short brass rule instead
## of another filled panel. Runtime text only; the rule is a ColorRect on the
## logical grid (no new art dependency).
static func make_section_caption(text: String, font_size: int = 16) -> Control:
var row := HBoxContainer.new()
row.add_theme_constant_override("separation", 8)
row.mouse_filter = Control.MOUSE_FILTER_IGNORE
var rule := ColorRect.new()
rule.color = Color(0.72, 0.56, 0.28, 0.9)
rule.custom_minimum_size = Vector2(3, 18)
rule.mouse_filter = Control.MOUSE_FILTER_IGNORE
row.add_child(rule)
var label := make_label(text, font_size, COLOR_BORDER)
label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
row.add_child(label)
return row
## A recessed skill slot: a single accent edge instead of a closed card frame.
## Used by the three battle manual actions so they read as abilities, not rows.
static func slot_style(accent: Color, tint: Color = Color(0.03, 0.07, 0.12, 0.72)) -> StyleBoxFlat:
@@ -142,14 +184,11 @@ static func skill_bar_slot_style(accent: Color) -> StyleBoxFlat:
## skill bar with hairlines instead of three adjacent filled boxes.
static func make_skill_bar_panel() -> PanelContainer:
var panel := PanelContainer.new()
var box := flat_style(Color(0.03, 0.07, 0.12, 0.94))
box.border_color = Color(0.55, 0.42, 0.24, 0.62)
box.set_border_width(SIDE_TOP, 2)
box.set_border_width(SIDE_BOTTOM, 1)
box.content_margin_left = 8
box.content_margin_right = 8
box.content_margin_top = 6
box.content_margin_bottom = 6
# Reuse the existing stage nine-slice as the skill-bar material. Tinting the
# gold band down makes it a carved console edge, not another filled card;
# slot accents stay the only loud marks on the bar.
var box := frame_style(FRAME_STAGE, 4)
box.modulate_color = Color(0.40, 0.48, 0.54, 0.92)
panel.add_theme_stylebox_override("panel", box)
panel.mouse_filter = Control.MOUSE_FILTER_PASS # don't block slot taps
return panel
@@ -223,6 +262,19 @@ static func glass_panel(alpha: float = 0.88) -> PanelContainer:
return panel
## The few real surfaces (offline report, world detail, settlement plaque,
## bottom nav) reuse the existing pixel panel nine-slice as their material.
## Tinting the gold band down leaves a chiseled edge; the centre stays
## translucent so the full-screen scene still reads through. No new texture.
static func make_surface_panel(alpha: float = 0.88) -> PanelContainer:
var panel := PanelContainer.new()
var box := frame_style(FRAME_PANEL, 6)
box.modulate_color = Color(0.56, 0.64, 0.68, alpha)
panel.add_theme_stylebox_override("panel", box)
panel.mouse_filter = Control.MOUSE_FILTER_PASS
return panel
static func make_panel(_frame_path: String = FRAME_PANEL) -> PanelContainer:
var panel := PanelContainer.new()
# Translucent glass card: one hairline on top, no closed box edge. The