feat(presentation): UI tweak batch -- opaque status slot backdrop + softer hover gold frame (55% alpha) + C-zone layout fill + 06 digit memo + ledger 182
This commit is contained in:
1 parent
b18a69bc00
commit
5ac07d94a6
6 files changed
+31
-11
No files matched your search
@@ -166,7 +166,8 @@ func _draw() -> void:
|
||||
var ds := 6.0
|
||||
draw_rect(Rect2(Vector2((edge - ds) * 0.5, (edge - ds) * 0.5), Vector2(ds, ds)), UiKit.HERO_BLUE, true)
|
||||
if hl_visible:
|
||||
draw_rect(Rect2(1, 1, edge - 2.0, edge - 2.0), hl_color, false, 2.0) # 2px 内描边(旧 hl Panel 等价)
|
||||
# 悬停高亮减淡(2026-09-26 用户反馈:金框太明显——绘制时 55% alpha,hl_color 属性与探针断言面不动)
|
||||
draw_rect(Rect2(1, 1, edge - 2.0, edge - 2.0), Color(hl_color, 0.55), false, 2.0) # 2px 内描边(旧 hl Panel 等价)
|
||||
|
||||
|
||||
# 文字位绘制:水平居中 + 垂直居中(基线 = (格高 − 字高)/2 + 上伸部——旧 Button 居中对齐等价)
|
||||
|
||||
@@ -25,24 +25,32 @@ func _init() -> void:
|
||||
var sb := UiKit.panel_flat(UiKit.PANEL_HERO, UiKit.PANEL_BORDER, 0, 1, Vector4(8, 6, 8, 6))
|
||||
add_theme_stylebox_override("panel", sb)
|
||||
var col := VBoxContainer.new()
|
||||
col.add_theme_constant_override("separation", 6)
|
||||
col.add_theme_constant_override("separation", 14) # 布局充实(2026-09-26 反馈③:区段间距放大)
|
||||
add_child(col)
|
||||
|
||||
col.add_child(UiKit.label("探险者", 16, true))
|
||||
col.add_child(UiKit.label("探险者", 17, true))
|
||||
# 数据行装框(直角细线数据框——battle.md Component Inventory C 区行规格落形;同时消化纵向空白)
|
||||
var data_box := PanelContainer.new()
|
||||
data_box.add_theme_stylebox_override("panel",
|
||||
UiKit.panel_flat(UiKit.PANEL_DATA, UiKit.PANEL_BORDER, 0, 1, Vector4(6, 4, 6, 4)))
|
||||
col.add_child(data_box)
|
||||
var data_col := VBoxContainer.new()
|
||||
data_col.add_theme_constant_override("separation", 8)
|
||||
data_box.add_child(data_col)
|
||||
_atk_label = _data_line()
|
||||
col.add_child(_atk_label)
|
||||
data_col.add_child(_atk_label)
|
||||
_armor_label = _data_line()
|
||||
col.add_child(_armor_label)
|
||||
data_col.add_child(_armor_label)
|
||||
|
||||
# 魔法道具槽(预留):随身战斗用道具的唯一展示面——空槽占位承诺格子在此,
|
||||
# 不预设交互(挖掘期指向交互归 E 区既有裁决);终稿样式/槽位数归魔法道具批
|
||||
col.add_child(UiKit.label("魔法道具", 14, true))
|
||||
col.add_child(UiKit.label("魔法道具", 15, true))
|
||||
item_slots = HBoxContainer.new()
|
||||
item_slots.add_theme_constant_override("separation", 6)
|
||||
item_slots.add_theme_constant_override("separation", 10)
|
||||
col.add_child(item_slots)
|
||||
for i in 4:
|
||||
var slot := PanelContainer.new()
|
||||
slot.custom_minimum_size = Vector2(40, 40)
|
||||
slot.custom_minimum_size = Vector2(48, 48)
|
||||
slot.add_theme_stylebox_override("panel",
|
||||
UiKit.panel_flat(UiKit.PANEL_DATA, UiKit.PANEL_BORDER, 0, 1, Vector4(4, 4, 4, 4)))
|
||||
slot.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
@@ -97,7 +105,7 @@ func armor_text() -> String:
|
||||
|
||||
|
||||
func _data_line() -> Label:
|
||||
var l := UiKit.label("", 14, false)
|
||||
var l := UiKit.label("", 16, false)
|
||||
l.clip_text = true
|
||||
l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
return l
|
||||
@@ -105,8 +105,10 @@ func _sync_slots(n: int) -> void:
|
||||
func _make_slot() -> PanelContainer:
|
||||
var slot := PanelContainer.new()
|
||||
if compact:
|
||||
# 槽底不透明(2026-09-26 用户反馈:图标显示不清晰——半透明底叠 B 区米色面板吃掉白图标对比度;
|
||||
# 改深墨棕实底 = 白色纹样图标对比承载,槽界同时可辨)
|
||||
slot.add_theme_stylebox_override("panel",
|
||||
UiKit.panel_flat(Color(0, 0, 0, 0.18), UiKit.PANEL_BORDER, 2, 1, Vector4(2, 1, 2, 1)))
|
||||
UiKit.panel_flat(UiKit.SLOT_BACKDROP, UiKit.PANEL_BORDER, 2, 1, Vector4(2, 1, 2, 1)))
|
||||
else:
|
||||
slot.custom_minimum_size = Vector2(50, 46)
|
||||
slot.add_theme_stylebox_override("panel", UiKit.panel_flat(UiKit.PANEL_DATA, UiKit.PANEL_BORDER))
|
||||
|
||||
@@ -53,6 +53,7 @@ const CONTACT_GLOW_DEEP := Color8(150, 190, 230) # 接触带呼吸暗端(ler
|
||||
const DIGIT_PLATE := Color8(245, 234, 211) # 数字色牌(素色暖纸白直角牌——art-bible §4.1;数字一律垫牌,
|
||||
# 可读不依赖格底——原则二;2026-09-26 呈现修复批落码)
|
||||
const DIGIT_PLATE_EDGE := Color8(210, 198, 172) # 色牌牌缘线
|
||||
const SLOT_BACKDROP := Color8(52, 44, 36) # B 区状态图标槽实底(深墨棕——白图标对比承载,2026-09-26 反馈④)
|
||||
|
||||
const BG_ROOT := Color8(30, 25, 20) # 屏幕根底
|
||||
const BG_OVERLAY := Color8(28, 22, 18) # 模态遮罩底
|
||||
|
||||
Reference in new issue
Block a user