Files
gplan-2/game/presentation/views/settlement_review_overlay.gd
T
DKChan 9a72394652 chore(代码卫生): 头注存量清偿批——82 文件按两类白名单改写为 ## 文档注释载体
按 code-conventions §1.4.1 第三轮定稿执行:core 22+schemas 18+presentation 根 14+views 28,全部头注 #→##、删日期/变更叙事/GDD 与架构反向链接/字段与域清单/机制描述,保留职责摘要+真实使用约束(防事故禁令/单一入口/信号契约每信号一行)。main.gd 31→5 行、save_manager 45→5 行、adventure_runner 37→5 行为最大单件。子代理分模块执行(波一 core+schemas、波二 presentation+views,并发≤2)。验收=tools/verify_comment_only_change.py 逐字节校验(82 文件头注区外逐行一致=零行为变更)+audit_file_headers 全绿;纯注释批免冒烟(先例 5843270)
2026-10-16 23:28:07 +08:00

49 lines
1.2 KiB
GDScript

## VERTICAL SLICE - NOT FOR PRODUCTION
## 结算明细回看模态:完整流水逐行只读呈现。
## 流水 BB 文本经 open() 整段喂入——本类零格式化,格式化规则归 BattleLogView。
class_name SettlementReviewOverlay
extends Control
signal closed
var _log: RichTextLabel
func _init() -> void:
var shell := UiKit.modal_shell(self, Color(UiKit.DIM, 0.62), Vector2(760, 560), 6, true)
(shell.dim as ColorRect).gui_input.connect(_on_dim_gui_input)
var box: VBoxContainer = shell.box
box.add_child(UiKit.label("结算明细回看(完整流水 · 逐行归因)",UiKit.FS_SUB, true))
_log = RichTextLabel.new()
_log.bbcode_enabled = true
_log.size_flags_vertical = Control.SIZE_EXPAND_FILL
_log.clip_contents = true
_log.scroll_active = true
box.add_child(_log)
var close_btn := UiKit.button("关闭")
close_btn.pressed.connect(close)
box.add_child(close_btn)
visible = false
func is_open() -> bool:
return visible
func open(full_bb_text: String) -> void:
_log.clear()
_log.append_text(full_bb_text)
visible = true
func close() -> void:
if not visible:
return
visible = false
closed.emit()
func _on_dim_gui_input(ev: InputEvent) -> void:
if ev is InputEventMouseButton and ev.pressed:
close()