iter49-卡3:营地五界面真窗口化批(窗壳形态换装):WINDOW_SIZE 720×640单点+modal_shell窗壳骨架+career同壳+screen_flow_probe V1-V8窗壳形态段

This commit is contained in:
DKChan committed 2026-11-02 07:30:34 +08:00
1 parent 240f1a1769
commit 041d509b4d
19 files changed
+524 -132

No files matched your search

-10
View File
@@ -14,21 +14,11 @@ const AUTOLOAD_PATH_RNG := "/root/RngService"
const AUTOLOAD_PATH_SAVE := "/root/SaveManager"
const AUTOLOAD_PATH_META := "/root/MetaProgression"
const UiAssembler := preload("res://presentation/ui_assembler.gd")
const Narrator := preload("res://presentation/battle_narrator.gd")
const TuneSimController := preload("res://presentation/tune_sim_controller.gd")
const DebugSessionScript := preload("res://presentation/debug_session.gd")
const TreasureInteractController := preload("res://presentation/treasure_interact_controller.gd") # 秘宝两步交互
const CurioInteractController := preload("res://presentation/curio_interact_controller.gd") # 三选一与替换子交互
const CampShopPresenter := preload("res://presentation/camp_shop_presenter.gd") # 营地/商店投影
const BoardResolversScript := preload("res://presentation/board_resolvers.gd") # 棋盘解析回调族
const MainUiBuild := preload("res://presentation/main_ui_build.gd") # 装配分步承接件
const MainAdventureFlow := preload("res://presentation/main_adventure_flow.gd") # 冒险流程承接件
const MainOverlayFlow := preload("res://presentation/main_overlay_flow.gd") # 覆盖层流程承接件
const MainDebugFlow := preload("res://presentation/main_debug_flow.gd") # 调试流程承接件
const MenuScreenScene := preload("res://presentation/scenes/menu_screen.tscn") # 三屏壳场景
const CampScreenScene := preload("res://presentation/scenes/camp_screen.tscn")
const AdventureScreenScene := preload("res://presentation/scenes/adventure_screen.tscn")
var db
var run_scope = null # 会话状态承载(run_scope.gd;_ready 即建闲时态,永非 null)
+14 -18
View File
@@ -1,5 +1,6 @@
## 营地子界面模态壳基类(锻造工坊/秘宝匣/天赋树/奖励格图鉴四子界面公共形态):
## 实底全屏暖亮档+石纹暗角+顶栏(铭牌+钥石徽)+内容列+底栏返回钮。
## 营地子界面功能窗口基类(锻造工坊/秘宝匣/天赋树/奖励格图鉴四子界面公共形态):
## 居中定尺寸窗壳(石板皮窗板+半透明压暗遮罩)+顶栏(铭牌+钥石徽)+内容列+底栏返回钮。
## 窗几何单点=WINDOW_SIZE(camp.md v2.5 起点 720×640);窗内滚动=内容体超高由子类滚动容器承载(窗不随内容涨)。
## 开合可见性归模态栈(登记层开合一律走栈);返回钮只发 closed——关层编排归 presenter(组合根单口)。
## 余额徽随子类 refresh_camp 刷新(钥石读数=投影单口,禁第二账本)。
class_name CampSubViewBase
@@ -7,24 +8,19 @@ extends Control
signal closed
const WINDOW_SIZE := Vector2(720, 640) # 功能窗口起点定值单点(camp.md v2.5——生涯页经本常量引用,禁第二处字面值)
var _balance_label: Label # 钥石徽数值行(探针直读面——ui_probe 余额文案断言改指新界面)
## 壳构建(子类 _init 调用一次):content 由子类先建好传入(列容器/滚动容器皆可)
## 壳构建(子类 _init 调用一次):content 由子类先建好传入(列容器/滚动容器皆可)。
## 窗壳骨架=UiKit.modal_shell(dim 全屏压暗+CenterContainer 居中+石板皮窗板;min_size 参数保持 ZERO
## 使窗板尺寸经 custom_minimum_size 精确可钉 720×640——panel_skinned 边距被 PANEL_SLICE 钳到 16 为既有工厂行为)
func _build_shell(title: String, icon_path: String, content: Control) -> void:
# 半透明压暗遮罩 0.6(camp.md v2.3 定稿——场景根留底可见,窗口之下垫遮罩;交互聚焦由遮罩 STOP 兜底)
var dim := UiKit._modal_dim(self, Color(UiKit.DIM, 0.6))
var margin := MarginContainer.new()
margin.set_anchors_preset(Control.PRESET_FULL_RECT)
margin.add_theme_constant_override("margin_left", 16)
margin.add_theme_constant_override("margin_right", 16)
margin.add_theme_constant_override("margin_top", 12)
margin.add_theme_constant_override("margin_bottom", 12)
dim.add_child(margin)
var col := VBoxContainer.new()
col.add_theme_constant_override("separation", 8)
margin.add_child(col)
_build_top_bar(col, title, icon_path)
# 半透明压暗遮罩 0.6(camp.md v2.5——场景根留底可见,窗口之下垫遮罩;交互聚焦由遮罩 STOP 兜底)
var shell := UiKit.modal_shell(self, Color(UiKit.DIM, 0.6), Vector2.ZERO, 8, UiKit.panel_skinned(Vector4(14, 12, 14, 12)))
shell.panel.custom_minimum_size = WINDOW_SIZE
_build_top_bar(shell.box, title, icon_path)
content.size_flags_vertical = Control.SIZE_EXPAND_FILL
# 内容米板身(柜台行板对比底=PanelData——旧柜台面板形态延续,行板墨色对比表不脱锚)
var body := PanelContainer.new()
@@ -32,8 +28,8 @@ func _build_shell(title: String, icon_path: String, content: Control) -> void:
UiKit.panel_flat(UiKit.PANEL_DATA, UiKit.PANEL_BORDER, UiKit.RADIUS_OBJECT, 1, Vector4(10, 10, 10, 10)))
body.size_flags_vertical = Control.SIZE_EXPAND_FILL
body.add_child(content)
col.add_child(body)
_build_bottom_bar(col)
shell.box.add_child(body)
_build_bottom_bar(shell.box)
visible = false # 登记模态初始隐(开合走栈)
+43 -17
View File
@@ -1,6 +1,6 @@
## VERTICAL SLICE - NOT FOR PRODUCTION
## 生涯页·只读全屏页:跨局终身计数汇总(不统计天赋树与账号成长态)。
## 入口唯一在开始覆盖层「营地与系统」组、局内不放;页内零跳转零动效(直开直关)。
## 生涯页·只读功能窗口:跨局终身计数汇总(不统计天赋树与账号成长态)。
## 入口=营地场景图帐篷旁笔记本;窗内零跳转零动效(直开直关)。
## 构成件全部经 UiKit 工厂产出——禁新素材/新色值/自建样式。
class_name CareerOverlay
extends Control
@@ -16,28 +16,37 @@ var _keystone_badge: UiKit.KeystoneBadge # 钥石余额(badge 工厂件—
func _init() -> void:
# 全屏页壳(T6/T7 对齐批先例——暖亮底+石纹弱质感+暗角+56px 通栏顶条+内容列)
var page: Dictionary[Variant, Variant] = UiKit.page_shell(self, true)
page.base.color = Color(UiKit.DIM, 0.6) # 功能窗口化(camp.md v2.3 定稿——场景根留底+半透明压暗遮罩 0.6;观感随样张目检校准)
var top: HBoxContainer = page.top_row
top.add_child(UiKit.label("生 涯",UiKit.FS_TITLE, true, UiKit.WARM))
var top_sp := Control.new()
top_sp.size_flags_horizontal = Control.SIZE_EXPAND_FILL
top.add_child(top_sp)
var close_btn := UiKit.button("返回", 90.0) # 紧凑返回钮(设置/状态面板先例形制)
close_btn.tooltip_text = "关闭生涯页,返回主菜单(本页只读,不发生任何购买或修改)"
close_btn.pressed.connect(_emit_closed)
top.add_child(close_btn)
# 功能窗口壳(camp.md v2.5 生涯页与四子界面同壳同形态——居中定尺寸窗板+半透明压暗遮罩 0.6;
# 窗几何单点=CampSubViewBase.WINDOW_SIZE,禁第二处字面值)
var shell := UiKit.modal_shell(self, Color(UiKit.DIM, 0.6), Vector2.ZERO, 8, UiKit.panel_skinned(Vector4(14, 12, 14, 12)))
shell.panel.custom_minimum_size = CampSubViewBase.WINDOW_SIZE
_build_top_row(shell)
var box: VBoxContainer = page.box
# 内容列滚动面(窗内滚动——窗尺寸不随内容增长;横向禁滚同四子界面形态)
var scroll := ScrollContainer.new()
scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL
scroll.size_flags_horizontal = Control.SIZE_EXPAND_FILL
scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
shell.box.add_child(scroll)
# 内容板(BG_BRIGHT——原页底色随壳迁移,内容板文字 token 零改——契约 9 口径)
var body := PanelContainer.new()
body.add_theme_stylebox_override("panel",
UiKit.panel_flat(UiKit.BG_BRIGHT, UiKit.PANEL_BORDER, UiKit.RADIUS_OBJECT, 1, Vector4(12, 12, 12, 12)))
body.size_flags_horizontal = Control.SIZE_EXPAND_FILL
scroll.add_child(body)
var box := VBoxContainer.new()
box.add_theme_constant_override("separation", 8)
body.add_child(box)
var hint := UiKit.label("跨局生涯汇总(只读——购买与装配在营地;历史冒险回看随后续批次)",
UiKit.FS_HINT, false, UiKit.WARM_SOFT)
hint.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART # 窗内换行——单行 min 宽会把定尺寸窗板撑宽(720 契约)
hint.size_flags_horizontal = Control.SIZE_EXPAND_FILL
box.add_child(hint)
# 组一·冒险战绩(终身计数域——存档 v6:总局数开局即计、冒险成功局数三关全通才计)
# 对比度口径:页底=暖亮档深棕(BG_BRIGHT),文字全用亮墨族 token(WARM 9.0:1 / WARM_SOFT 8.0:1 /
# 对比度口径:内容板底=暖亮档深棕(BG_BRIGHT),文字全用亮墨族 token(WARM 9.0:1 / WARM_SOFT 8.0:1 /
# CANDLE 7.2:1 / INK_L_GOLD 9.1:1 实测对 BG_BRIGHT 全过 §7.2 ≥4.5:1——深墨族〔INK_LABEL〕
# 压深棕底仅 ~1.3:1 属违例,禁用)
# 压深棕底仅 ~1.3:1 属违例,禁用;顶行标题墨压石板皮不在此列——INK_TITLE 深墨族先例)
_section_head(box, "冒险战绩")
_total_label = _row(box, "冒险总局数")
_cleared_label = _row(box, "冒险成功局数")
@@ -58,6 +67,21 @@ func _init() -> void:
visible = false # 显式初始化——不靠树序巧合(缺陷⑤家族纪律)
# 顶行(「生 涯」标题+「返回」钮——文案与连接零改;标题墨随亮底石板皮惯例订正 INK_TITLE——设置/状态面板先例)
func _build_top_row(shell: Dictionary[Variant, Variant]) -> void:
var top := HBoxContainer.new()
top.add_theme_constant_override("separation", 10)
(shell.box as VBoxContainer).add_child(top)
top.add_child(UiKit.label("生 涯",UiKit.FS_TITLE, true, UiKit.INK_TITLE))
var top_sp := Control.new()
top_sp.size_flags_horizontal = Control.SIZE_EXPAND_FILL
top.add_child(top_sp)
var close_btn := UiKit.button("返回", 90.0) # 紧凑返回钮(设置/状态面板先例形制)
close_btn.tooltip_text = "关闭生涯页,返回主菜单(本页只读,不发生任何购买或修改)"
close_btn.pressed.connect(_emit_closed)
top.add_child(close_btn)
# ---- 开层(组合根唯一调用口——快照随开随建,只读同源口径同状态面板 R4)----
func open_career(data: Dictionary) -> void:
@@ -91,5 +115,7 @@ func _row(box: VBoxContainer, name_text: String) -> Label:
name_l.custom_minimum_size = Vector2(150, 0)
line.add_child(name_l)
var val_l := UiKit.label("—",UiKit.FS_BODY, true, UiKit.CANDLE)
val_l.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART # 长值窗内换行——定尺寸窗禁单行 min 宽撑宽(同 hint 口径)
val_l.size_flags_horizontal = Control.SIZE_EXPAND_FILL
line.add_child(val_l)
return val_l
+1 -1
View File
@@ -230,7 +230,7 @@ static func motion(dur: float) -> float:
# 的字形/无演出回退路径;禁 preload(素材缺位树上直接断言炸脚本,冒烟安全红线)
const TEX_HERO_IDLE := "res://assets/art/character/character_hero_idle.png"
const TEX_HERO_WALK := "res://assets/art/character/character_hero_walk.png"
const TEX_HERO_PORTRAIT := "res://assets/art/character/character_hero_portrait.png" # B 区站桩立绘·normal 态(48px 档)
const TEX_HERO_PORTRAIT := "res://assets/art/character/character_hero_portrait.png" # B 区站桩立绘·normal 态(素材=原稿分辨率,显示档缩放读 standee_motion PORTRAIT_DISPLAY_H)
const TEX_HERO_ATTACK := "res://assets/art/character/character_hero_attack.png" # B 区站桩立绘·attack 态(三态切换)
const TEX_HERO_HIT := "res://assets/art/character/character_hero_hit.png" # B 区站桩立绘·hit 态(三态切换)
# 敌种立绘(B 区站桩)——文件键 = 数据表主键 enemy_id(圣经 §8.3 命名规范),