feat(ui): 立体档位设置按钮——D 区 AP 条右键组「立体:X」常驻显示当前档、点击循环(F9 同效同标签联动);ApBarView/BoardZoneView 信号转发+main 组合根共享 _cycle_depth_tier(用户反馈「不知道当前对应哪个档」2026-09-24,台账 154)
This commit is contained in:
1 parent
d333a15c35
commit
9b35cf8c4b
3 files changed
+34
-5
No files matched your search
@@ -11,6 +11,7 @@ extends PanelContainer
|
||||
signal stop_pressed
|
||||
signal refresh_confirmed
|
||||
signal legend_toggled
|
||||
signal depth_cycle_requested # 立体原型批 2026-09-24——档位循环按钮(原型临时件,定稿后随 F9 入口一并退役)
|
||||
|
||||
const COL_GOLD := UiKit.GOLD
|
||||
const COL_DOT_OFF := UiKit.DOT_OFF
|
||||
@@ -20,6 +21,7 @@ var _dots: HBoxContainer
|
||||
var _ap_label: Label
|
||||
var _btn_stop: Button
|
||||
var _btn_legend: Button
|
||||
var _btn_depth: Button
|
||||
var _btn_refresh: Button
|
||||
var _refresh_sub: Label
|
||||
var _confirm_row: HBoxContainer
|
||||
@@ -74,6 +76,13 @@ func _init() -> void:
|
||||
_btn_legend.pressed.connect(func(): legend_toggled.emit())
|
||||
row.add_child(_btn_legend)
|
||||
|
||||
# 立体原型档位按钮(原型临时件——标签实时显示当前档;点击循环,F9 同效)
|
||||
_btn_depth = UiKit.button("立体:平面")
|
||||
_btn_depth.custom_minimum_size = Vector2(96, 0)
|
||||
_btn_depth.size_flags_vertical = Control.SIZE_SHRINK_CENTER
|
||||
_btn_depth.pressed.connect(func(): depth_cycle_requested.emit())
|
||||
row.add_child(_btn_depth)
|
||||
|
||||
var refresh_box := VBoxContainer.new()
|
||||
refresh_box.add_theme_constant_override("separation", 0)
|
||||
refresh_box.size_flags_vertical = Control.SIZE_SHRINK_CENTER
|
||||
@@ -121,6 +130,11 @@ func set_legend_enabled(on: bool) -> void:
|
||||
_btn_legend.disabled = not on
|
||||
|
||||
|
||||
# 立体档标签回写(main 组合根切档后调用——按钮文字即常驻档位指示器)
|
||||
func set_depth_label(tier_short: String) -> void:
|
||||
_btn_depth.text = "立体:" + tier_short
|
||||
|
||||
|
||||
# 探针/装配复用:刷新按钮可用性(预判 = RAP 足额 + 上限未到)
|
||||
func is_refresh_ready() -> bool:
|
||||
return not _btn_refresh.disabled
|
||||
|
||||
@@ -16,6 +16,7 @@ signal action_requested(cell: Vector2i, kind: String)
|
||||
signal stop_pressed
|
||||
signal refresh_confirmed
|
||||
signal legend_toggled
|
||||
signal depth_cycle_requested # 立体原型批 2026-09-24——档位循环按钮转发(原型临时件)
|
||||
signal hover_forbidden(cell: Vector2i)
|
||||
signal chord_attempted(cell: Vector2i)
|
||||
|
||||
@@ -46,3 +47,9 @@ func _init() -> void:
|
||||
ap_bar.stop_pressed.connect(func(): stop_pressed.emit())
|
||||
ap_bar.refresh_confirmed.connect(func(): refresh_confirmed.emit())
|
||||
ap_bar.legend_toggled.connect(func(): legend_toggled.emit())
|
||||
ap_bar.depth_cycle_requested.connect(func(): depth_cycle_requested.emit())
|
||||
|
||||
|
||||
# 立体档标签回写(main 组合根切档后调用——按钮文字即常驻档位指示器)
|
||||
func set_depth_label(tier_short: String) -> void:
|
||||
ap_bar.set_depth_label(tier_short)
|
||||
Reference in new issue
Block a user