iter52-卡3:迭代52卡③(presentation层封装修复): A1三类42字段公开化(280处改址)+A2拆件子件公开面(vitals14/motion14/board_hover七口)+B族组合根交接面(18服务+12句柄口,束参两处,on_*保私有)+C族杂项(UiKit三工厂/构造交付)——presentation私取sweep恒零(V1-V4,105checks),main.gd例外键32与ui_kit例外键23落基线(§3.2误测0/0反哺点),探针测试22处引用迁移,渲染golden与探针套件零转红; 验收档中
This commit is contained in:
1 parent
f2c3a3887d
commit
67024cb9ec
42 files changed
+1391
-679
No files matched your search
@@ -33,7 +33,24 @@ func _init(bundle: Dictionary) -> void:
|
||||
_cb_chord = bundle["chord"]
|
||||
|
||||
|
||||
func _hover_at(pos: Vector2) -> void:
|
||||
# ---- 公开操作面(pres封装 A2——宿主经此驱动,字段保持私有)----
|
||||
|
||||
# 每战重绑(排雷玩法对象随战更替——宿主 rebuild 同拍调用)
|
||||
func rebind(minesweeper: Variant) -> void:
|
||||
_minesweeper = minesweeper
|
||||
|
||||
|
||||
# 硬复位悬停锚(无 unhover 视觉清理——宿主 rebuild 前提下视觉随重建清零)
|
||||
func reset() -> void:
|
||||
_hover = Vector2i(-9, -9)
|
||||
|
||||
|
||||
# 悬停现值读口(宿主呈现查询)
|
||||
func hover_pos() -> Vector2i:
|
||||
return _hover
|
||||
|
||||
|
||||
func hover_at(pos: Vector2) -> void:
|
||||
var c: Vector2i = _cb_cell_at.call(pos)
|
||||
if c.x < 0:
|
||||
if _hover.x >= 0:
|
||||
@@ -44,13 +61,13 @@ func _hover_at(pos: Vector2) -> void:
|
||||
_on_cell_hover(c)
|
||||
|
||||
|
||||
func _on_shell_mouse_exited() -> void:
|
||||
func on_shell_mouse_exited() -> void:
|
||||
if _hover.x >= 0:
|
||||
_on_cell_unhover(_hover)
|
||||
|
||||
|
||||
# chord 肌肉记忆首遇锚:同格双左击快开尝试(350ms 窗)——每 run 一次提示由组合根去重
|
||||
func _detect_chord(c: Vector2i) -> void:
|
||||
func detect_chord(c: Vector2i) -> void:
|
||||
var now := Time.get_ticks_msec()
|
||||
if _last_click.cell == c and now - int(_last_click.ms) <= CHORD_WINDOW_MS:
|
||||
_cb_chord.call(c)
|
||||
@@ -70,7 +87,7 @@ func _on_cell_unhover(c: Vector2i) -> void:
|
||||
_clear_hover_visuals(c)
|
||||
|
||||
|
||||
func _refresh_hover_after_paint() -> void:
|
||||
func refresh_after_paint() -> void:
|
||||
# 状态随 refresh 变化后光标/边框语义需重算(悬停格四格态可能已变)
|
||||
if _hover.x >= 0 and _cells.has(_hover):
|
||||
_apply_hover_visuals(_hover)
|
||||
|
||||
Reference in new issue
Block a user