iter49-卡2:模态句柄分域批(句柄册三域化):UiModals 14→3纯字段容器+run/menu两新子容器+ModalFlow升格注册面直驻+全仓寻址换代+V1结构断言
This commit is contained in:
1 parent
11beb4fc59
commit
240f1a1769
28 files changed
+552
-513
No files matched your search
@@ -21,17 +21,17 @@ static func _show_debug_overlay(root: Variant) -> void:
|
||||
# 门禁:对局中可开;本函数仍是唯一开窗入口,门禁逻辑收函数内:
|
||||
# 棋盘输入锁/状态角标判据排除浮窗,
|
||||
# 遮挡语义=ModalStack 登记制(他模态开时暂隐、关后自动恢复),此处零场景限制
|
||||
if root.ui.modals.debug_overlay == null:
|
||||
if root.ui.modals.menu.debug_overlay == null:
|
||||
return
|
||||
root.ui.modals.flow.open(root.ui.modals.debug_overlay)
|
||||
root.ui.flow.open(root.ui.modals.menu.debug_overlay)
|
||||
_sync_debug_overlay(root)
|
||||
|
||||
|
||||
|
||||
# 调试浮窗角标点击(两屏同款处理器——与状态角标同形制守卫;仍收口 _show_debug_overlay 单口)
|
||||
static func _on_debug_badge_pressed(root: Variant) -> void:
|
||||
var map_on: bool = root.ui.modals.level_screen != null and root.ui.modals.level_screen.visible
|
||||
if (map_on and root.ui.modals.flow.badge_greyed_map()) or (not map_on and root.ui.modals.flow.badge_greyed_battle()):
|
||||
var map_on: bool = root.ui.modals.run.level_screen != null and root.ui.modals.run.level_screen.visible
|
||||
if (map_on and root.ui.flow.badge_greyed_map()) or (not map_on and root.ui.flow.badge_greyed_battle()):
|
||||
return
|
||||
_show_debug_overlay(root)
|
||||
|
||||
@@ -40,10 +40,10 @@ static func _on_debug_badge_pressed(root: Variant) -> void:
|
||||
# 浮窗上下文同步(当局数据刷新+对局中按钮禁用单点):调用面=开窗口与模态开合
|
||||
# 单口(凡影响开态/对局态的路径必经其一——与 _sync_status_entry 同款纪律)
|
||||
static func _sync_debug_overlay(root: Variant) -> void:
|
||||
if root.ui.modals.debug_overlay == null:
|
||||
if root.ui.modals.menu.debug_overlay == null:
|
||||
return
|
||||
root.ui.modals.debug_overlay.set_context_locked(root.run_scope.settlement != null or root.run_scope.is_adventure) # 对局中批量模拟/两层调试入口禁用(长程异步模拟与活跃结算并存态不开放)
|
||||
root.ui.modals.debug_overlay.update_run_data(_debug_run_data(root)) # 当局数据只读区块喂入(开窗+模态开合信号驱动)
|
||||
root.ui.modals.menu.debug_overlay.set_context_locked(root.run_scope.settlement != null or root.run_scope.is_adventure) # 对局中批量模拟/两层调试入口禁用(长程异步模拟与活跃结算并存态不开放)
|
||||
root.ui.modals.menu.debug_overlay.update_run_data(_debug_run_data(root)) # 当局数据只读区块喂入(开窗+模态开合信号驱动)
|
||||
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ static func _debug_run_data(root: Variant) -> Dictionary:
|
||||
|
||||
|
||||
static func _close_debug_overlay(root: Variant) -> void:
|
||||
root.ui.modals.flow.close(root.ui.modals.debug_overlay) # 模态栈单口——开始层全程未隐藏,无需恢复
|
||||
root.ui.flow.close(root.ui.modals.menu.debug_overlay) # 模态栈单口——开始层全程未隐藏,无需恢复
|
||||
|
||||
static func _on_tune_apply(root: Variant, atk_pct: int, hp_pct: int) -> void:
|
||||
# 加成无持久态可"落"——各战斗开局经 board_resolvers.debug_hero_override/runner 现算生效(应用=关闭浮窗)
|
||||
@@ -83,8 +83,8 @@ static func _start_debug_levels(root: Variant) -> void:
|
||||
# settlement/编排态=状态机破坏;模拟在跑时 reset_sliders 会作废测量读数(d5 置灰之外的信号绕过闸)
|
||||
if root.run_scope.is_adventure or root.run_scope.settlement != null or root._tune_sim.is_running():
|
||||
return
|
||||
root.ui.modals.debug_overlay.reset_sliders()
|
||||
root.ui.modals.flow.close(root.ui.modals.debug_overlay) # 浮窗内入口发起——随开随收(对局期不可再开:门禁在 _show_debug_overlay)
|
||||
root.ui.modals.menu.debug_overlay.reset_sliders()
|
||||
root.ui.flow.close(root.ui.modals.menu.debug_overlay) # 浮窗内入口发起——随开随收(对局期不可再开:门禁在 _show_debug_overlay)
|
||||
root.ui.screens.start_overlay.visible = false
|
||||
root.ui.battle.log_view.clear()
|
||||
root.ui.battle.log_view.append_bb(root.Narrator.debug_open_line(root._seed_value(), 1, true))
|
||||
|
||||
Reference in new issue
Block a user