From e5427af6bc8857c7f89ebfd407ed568877fb72dc Mon Sep 17 00:00:00 2001 From: DKChan <524912269@qq.com> Date: Tue, 6 Oct 2026 03:49:27 +0800 Subject: [PATCH] =?UTF-8?q?iter16ui=20T8=EF=BC=9AP8=E7=94=B2=E5=8D=A1?= =?UTF-8?q?=E9=A1=B6=E7=B1=BB=E5=9E=8B=E8=89=B2=E5=B8=A6Bayer=E6=9C=89?= =?UTF-8?q?=E5=BA=8F=E6=8A=96=E5=8A=A8=E8=AF=95=E7=82=B9=EF=BC=88bcard=20b?= =?UTF-8?q?and=E5=B9=B3=E6=B6=82ColorRect=E9=80=80=E5=BD=B9=E2=86=92Dither?= =?UTF-8?q?Band=204=C3=974=20Bayer=202px=E5=85=83=E8=83=9E=CE=B1=E6=B7=B1?= =?UTF-8?q?=E8=87=B3=E9=9B=B6=E9=9D=99=E6=80=81=E7=BB=98=E5=88=B6=EF=BC=9B?= =?UTF-8?q?=E9=9A=8FTG=5F*=E9=80=90=E5=8D=A1=E7=9D=80=E8=89=B2=EF=BC=9B?= =?UTF-8?q?=E5=85=A8=E7=AB=99/B=E5=8C=BA=E8=8C=83=E5=9B=B4=E7=95=99?= =?UTF-8?q?=E5=90=8E=E6=89=B9=3D=E4=BB=BB=E5=8A=A1=E4=B9=A6P8=E7=94=B2?= =?UTF-8?q?=E5=8E=9F=E6=96=87=EF=BC=9B=E8=BD=BB=E9=97=B8=E5=86=92=E7=83=9F?= =?UTF-8?q?782/0+=E4=B8=89=E6=8E=A2=E9=92=88=E7=BB=BF=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/presentation/views/ui_kit.gd | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/game/presentation/views/ui_kit.gd b/game/presentation/views/ui_kit.gd index b76deb00..2e6840ae 100644 --- a/game/presentation/views/ui_kit.gd +++ b/game/presentation/views/ui_kit.gd @@ -443,8 +443,31 @@ static func danger_button(text: String, tip := "") -> Button: return b +# 卡顶类型色带·Bayer 有序抖动(UI 设计对齐批 P8 甲 2026-10-06——bcard band 平涂 ColorRect 退役; +# demo CSS 平滑渐变/blur 违反像素纪律,改 4×4 Bayer 有序抖动台阶:α 由深至 0,2px 元胞逐行降覆盖; +# 纯静态绘制零动效(减动效无涉);Bayer 阶数=实现细节白名单项,取 4×4) +class DitherBand: + extends Control + var band: Color + + func _init(c: Color) -> void: + band = c + custom_minimum_size = Vector2(0, 8) # 8px = 4×4 Bayer 全周期(原平涂条 6px) + + func _draw() -> void: + var bayer := [[0, 8, 2, 10], [12, 4, 14, 6], [3, 11, 1, 9], [15, 7, 13, 5]] + var cell := 2.0 + var rows := int(ceil(custom_minimum_size.y / cell)) + var cols := int(ceil(size.x / cell)) + for ry in rows: + var cover := 1.0 - float(ry) / float(rows) # 顶行全覆盖 → 底行趋零 + for rx in cols: + if float(bayer[ry % 4][rx % 4]) / 16.0 < cover: + draw_rect(Rect2(float(rx) * cell, float(ry) * cell, cell, cell), band, true) + + # bcard 竖卡工厂(商店/三选一同构卡——M6/M7 共用;M7.1 差异仅=价签 vs ✓选择章) -# 返回 {panel, mark, band, icon, name_l, desc_l, price_l, foot_l};set_selected 经 mark/样式换装 +# set_selected 经 mark/样式换装 class BCard: extends PanelContainer var mark: Label @@ -467,9 +490,7 @@ class BCard: box.add_theme_constant_override("separation", 8) add_child(box) body = box - var band_r := ColorRect.new() - band_r.color = band - band_r.custom_minimum_size = Vector2(0, 6) + var band_r := DitherBand.new(band) # P8 甲:卡顶类型色带=Bayer 有序抖动带(随各 TG_* 逐卡着色) box.add_child(band_r) mark = UiKit.label("✓",FS_BODY, true, Color8(58, 42, 8)) mark.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT