iter41-卡2:呈现层结构收敛批:67清+2豁免+2展平改善——拆私有族+六状态件+ui_kit收敛+束收拢+print删;含u14补做、并master并案与收尾产出物
This commit is contained in:
1 parent
bc75dab615
commit
7beb9bfdd5
94 files changed
+3417
-5314
No files matched your search
@@ -101,31 +101,11 @@ static func build_start_overlay(host: Control, db: ConfigDb = null) -> Dictionar
|
||||
var bd := UiKit.backdrop_tile()
|
||||
if bd != null:
|
||||
overlay.add_child(bd)
|
||||
overlay.add_child(UiKit.beams_rect())
|
||||
overlay.add_child(UiKit._beams_rect())
|
||||
overlay.add_child(UiKit.vignette_rect())
|
||||
# 双列骨架:左=操作列 56% / 右=舞台(立绘看台)
|
||||
var cols := HBoxContainer.new()
|
||||
cols.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||
cols.add_theme_constant_override("separation", 32)
|
||||
var pad := MarginContainer.new()
|
||||
pad.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||
for side in ["margin_left", "margin_right", "margin_top", "margin_bottom"]:
|
||||
pad.add_theme_constant_override(side, 56)
|
||||
cols.add_child(pad)
|
||||
overlay.add_child(cols)
|
||||
var box := VBoxContainer.new()
|
||||
box.name = "start_box"
|
||||
box.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
box.size_flags_stretch_ratio = 1.4
|
||||
box.add_theme_constant_override("separation", 10)
|
||||
pad.add_child(box)
|
||||
|
||||
var title := UiKit.label("Dungeon Sweeper",UiKit.FS_H1, true, UiKit.INK_ON_DEEP)
|
||||
box.add_child(title)
|
||||
box.add_child(HSeparator.new())
|
||||
|
||||
# 三入口(主菜单三入口化——营地交互重做卡②,用户裁决 1:进入存档/设置/退出游戏;
|
||||
# 组帽双撤——冒险组帽组内零钮退化态不留、「营地与系统」帽指称失义,追认单留痕)
|
||||
var cols := _start_columns(overlay)
|
||||
var box := _start_left_column(cols)
|
||||
var entersavebtn := UiKit.primary_button("进入存档") # 主操作钮(唯一进度入口)
|
||||
entersavebtn.tooltip_text = "选择一个存档位进入(新档 / 进档 / 删档)"
|
||||
box.add_child(entersavebtn)
|
||||
@@ -135,12 +115,45 @@ static func build_start_overlay(host: Control, db: ConfigDb = null) -> Dictionar
|
||||
# 退出游戏与设置同层并行——只在一级菜单出现(行为零变化——契约 2)
|
||||
var quitbtn := UiKit.button("退出游戏")
|
||||
box.add_child(quitbtn)
|
||||
|
||||
# 调试入口收浮层角标;boot 菜单优先不开
|
||||
# 浮窗,调试入口=UI 最顶层全局浮层角标(build_debug_badge——LAYER_CONTRACT 末位、
|
||||
# ModalStack 登记外,任何 UI 不遮挡;本层不设屏内调试角标,全局浮层全场景承载)
|
||||
_start_right_column(cols)
|
||||
return {"overlay": overlay, "box": box,
|
||||
"entersavebtn": entersavebtn,
|
||||
"settingsbtn": settingsbtn, "quitbtn": quitbtn}
|
||||
|
||||
# 右列:立绘看台(三张立绘 + 标题底座;界面禁玩法文字墙,故无速览牌)
|
||||
|
||||
## 双列骨架域:左=操作列 56% / 右=舞台(立绘看台)——全屏锚+56px 四边衬距
|
||||
static func _start_columns(overlay: Control) -> HBoxContainer:
|
||||
var cols := HBoxContainer.new()
|
||||
cols.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||
cols.add_theme_constant_override("separation", 32)
|
||||
var pad := MarginContainer.new()
|
||||
pad.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||
for side in ["margin_left", "margin_right", "margin_top", "margin_bottom"]:
|
||||
pad.add_theme_constant_override(side, 56)
|
||||
cols.add_child(pad)
|
||||
overlay.add_child(cols)
|
||||
return cols
|
||||
|
||||
|
||||
## 左操作列域:标题+三入口(主菜单三入口化——营地交互重做卡②,用户裁决 1:
|
||||
## 进入存档/设置/退出游戏;组帽双撤——冒险组帽组内零钮退化态不留、「营地与系统」帽指称失义,追认单留痕)
|
||||
static func _start_left_column(cols: HBoxContainer) -> VBoxContainer:
|
||||
var box := VBoxContainer.new()
|
||||
box.name = "start_box"
|
||||
box.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
box.size_flags_stretch_ratio = 1.4
|
||||
box.add_theme_constant_override("separation", 10)
|
||||
(cols.get_child(0) as MarginContainer).add_child(box)
|
||||
box.add_child(UiKit.label("Dungeon Sweeper",UiKit.FS_H1, true, UiKit.INK_ON_DEEP))
|
||||
box.add_child(HSeparator.new())
|
||||
return box
|
||||
|
||||
|
||||
## 右列域:立绘看台(三张立绘 + 标题底座;界面禁玩法文字墙,故无速览牌)
|
||||
static func _start_right_column(cols: HBoxContainer) -> void:
|
||||
var right := VBoxContainer.new()
|
||||
right.name = "start_right"
|
||||
right.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
@@ -153,17 +166,7 @@ static func build_start_overlay(host: Control, db: ConfigDb = null) -> Dictionar
|
||||
foe_row.alignment = BoxContainer.ALIGNMENT_CENTER
|
||||
foe_row.add_theme_constant_override("separation", 36)
|
||||
for cfg in [[UiKit.TEX_ENEMY_GOBLIN, 46, 96], [UiKit.TEX_HERO_PORTRAIT, 138, 144], [UiKit.TEX_ENEMY_OGRE_CHIEF, 80, 96]]:
|
||||
var tr := TextureRect.new()
|
||||
var tex := UiKit.load_tex(cfg[0])
|
||||
if tex != null:
|
||||
tr.texture = tex
|
||||
tr.custom_minimum_size = Vector2(cfg[1], cfg[2])
|
||||
tr.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
|
||||
tr.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
|
||||
tr.texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST
|
||||
if cfg[0] != UiKit.TEX_HERO_PORTRAIT:
|
||||
tr.modulate = Color(0.7, 0.7, 0.7, 0.4) # 敌影剪影退后(§6.1 立绘>背景)
|
||||
foe_row.add_child(tr)
|
||||
foe_row.add_child(_start_portrait(cfg))
|
||||
stage.add_child(foe_row)
|
||||
var pedestal := Panel.new()
|
||||
var ped_sb := UiKit.panel_flat(UiKit.TITLE_PEDESTAL, UiKit.BG_ROOT, 17, 2)
|
||||
@@ -173,9 +176,20 @@ static func build_start_overlay(host: Control, db: ConfigDb = null) -> Dictionar
|
||||
stage.add_child(pedestal)
|
||||
right.add_child(stage)
|
||||
|
||||
return {"overlay": overlay, "box": box,
|
||||
"entersavebtn": entersavebtn,
|
||||
"settingsbtn": settingsbtn, "quitbtn": quitbtn}
|
||||
|
||||
## 单立绘域(循环体提函数——像素过滤居中;敌影剪影退后 §6.1 立绘>背景)
|
||||
static func _start_portrait(cfg: Array) -> TextureRect:
|
||||
var tr := TextureRect.new()
|
||||
var tex := UiKit.load_tex(cfg[0])
|
||||
if tex != null:
|
||||
tr.texture = tex
|
||||
tr.custom_minimum_size = Vector2(cfg[1], cfg[2])
|
||||
tr.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
|
||||
tr.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
|
||||
tr.texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST
|
||||
if cfg[0] != UiKit.TEX_HERO_PORTRAIT:
|
||||
tr.modulate = Color(0.7, 0.7, 0.7, 0.4)
|
||||
return tr
|
||||
|
||||
|
||||
# 调试浮层入口角标(UI 最顶层浮层,任何 UI 不遮挡)——main 直接子层、
|
||||
|
||||
Reference in new issue
Block a user