fix(presentation): 呈现修复批——数字色牌落码(原则二:已开格字形垫 #F5EAD3 素牌,救回暗地面瓦片上数字/雷字可读性)+墙格轮廓加强(地面朝向边程序 2px 深墨线,§8.5 结构归程序)+台账 177;高墙感研究件交 mockups 待用户挑档

This commit is contained in:
DKChan committed 2026-09-26 16:25:23 +08:00
1 parent 71e5a0c59b
commit 8db7d7d37a
4 files changed
+38 -1

No files matched your search

@@ -20,6 +20,8 @@ var bg_sb: StyleBoxFlat = null # 格底 StyleBox(BoardView 每次 paint
var contact_bands: Array = [] # 正交接触边码 0=N/1=S/2=W/3=E(该侧整条边)
var contact_corners: Array = [] # 斜向共享角码 0=NW/1=NE/2=SW/3=SE(角点+两侧各半条边)
var contact_col := Color(0, 0, 0, 0) # 当前呼吸色(alpha 0 = 不画)
var plate := false # 数字色牌开关(BoardView paint 按已开格 glyph 写入——原则二)
var outline_sides: Array = [] # 墙格地面朝向描边码 0=N/1=S/2=W/3=E(轮廓加强批——程序侧结构件)
var glyph := "": # 文字位——数字/雷/旗/人/?(现行视觉旗与数字互斥,同位承载)
set(v):
glyph = v
@@ -63,6 +65,20 @@ func _draw() -> void:
# 呼吸微光/主角蓝框由 BoardView 改 bg_sb 后触发重绘)
if tex_base != null:
draw_texture_rect(tex_base, rect, false)
# 轮廓加强(2026-09-26 用户反馈「轮廓线不明显」):墙格地面朝向边补 2px 深墨线(§8.5 结构归程序——
# 素材 1px 墨线在 45/36px 非整数缩放下视觉衰减,程序线保底;墙-墙内界不画,保墙群内聚;
# 坐标推导:各边内贴 2px 矩形,相邻边矩形全长相交=周界闭合)
if not outline_sides.is_empty():
var ow := 2.0
var oc := Color8(30, 24, 18)
for b in outline_sides:
var or_ := Rect2()
match int(b):
0: or_ = Rect2(0, 0, edge, ow)
1: or_ = Rect2(0, edge - ow, edge, ow)
2: or_ = Rect2(0, 0, ow, edge)
3: or_ = Rect2(edge - ow, 0, ow, edge)
draw_rect(or_, oc, true)
# 瓦片态描边覆盖层(高墙瓦片接线批 2026-09-26):tex_base 在位时 BoardView 传入的 bg_sb
# 已降级为「透明底 + 描边」载体——呼吸微光/主角蓝框画在瓦片之上(art-bible §1.2 叠层序
# 不变:底 < 纹带 < 数字 < 旗 < 焦点高亮);素材缺位回退走 elif 程序化原样,零观感变化
@@ -124,6 +140,15 @@ func _draw() -> void:
draw_texture_rect(tex_mutation, rect, false)
# ③ 数字/徽章(数字 ≥ 格高 50% 墨族对格底 ≥4.5:1;徽章右下角金,遮蔽态 = "?")
if glyph != "":
# 数字色牌(原则二:数字一律垫素色直角牌——对比由牌墨承载,可读不依赖格底;暗地面瓦片批的
# 可读性修复 2026-09-26。牌尺寸 0.66/0.68 格边居中——字形 ≥0.5 格边在牌内留白 ≥1px;
# 旗=未开格不垫牌(旗朱在墙瓦片上已可读))
if plate:
var pw := edge * 0.66
var ph := edge * 0.68
var pr := Rect2((edge - pw) * 0.5, (edge - ph) * 0.5, pw, ph)
draw_rect(pr, UiKit.DIGIT_PLATE, true)
draw_rect(pr, UiKit.DIGIT_PLATE_EDGE, false, 1.0)
if tex_glyph != null:
draw_texture_rect(tex_glyph, rect, false)
else:
+8
View File
@@ -653,6 +653,14 @@ func _paint_cell(c: Vector2i, hero: Vector2i) -> void:
u.bg_sb = sb
u.glyph = glyph
u.glyph_color = digit_col
u.plate = revealed and glyph != "" # 数字色牌(原则二——已开格字形全垫牌;旗在未开格不垫)
u.outline_sides = []
if _tiles_ok and not revealed:
# 轮廓加强:墙格四邻中已开(地面)格朝向记描边码(板外=墙不描——保墙群外轮廓只在墙/地交界)
for d in [Vector2i(0, -1), Vector2i(0, 1), Vector2i(-1, 0), Vector2i(1, 0)]:
var n: Vector2i = c + d
if n.x >= 0 and n.y >= 0 and n.x < _board.width and n.y < _board.height and _minesweeper.is_revealed(n):
u.outline_sides.append(0 if d.y < 0 else (1 if d.y > 0 else (2 if d.x < 0 else 3)))
u.badge_glyph = _update_badge(c)
u.queue_redraw()
+3
View File
@@ -50,6 +50,9 @@ const FLOOR := Color8(179, 154, 120) # 棋盘·已开裸土 #B39A78
const CONTACT_GLOW := Color8(214, 236, 255) # 可挖域接触带微光(蓝族浅一档·近白蓝——art-bible §3.2 v2.8 定稿;
# 旧绿相 DIG_EDGE 随画法切换退役 2026-09-26 批)
const CONTACT_GLOW_DEEP := Color8(150, 190, 230) # 接触带呼吸暗端(lerp 目标)
const DIGIT_PLATE := Color8(245, 234, 211) # 数字色牌(素色暖纸白直角牌——art-bible §4.1;数字一律垫牌,
# 可读不依赖格底——原则二;2026-09-26 呈现修复批落码)
const DIGIT_PLATE_EDGE := Color8(210, 198, 172) # 色牌牌缘线
const BG_ROOT := Color8(30, 25, 20) # 屏幕根底
const BG_OVERLAY := Color8(28, 22, 18) # 模态遮罩底