feat: complete mobile UI implementation
This commit is contained in:
@@ -44,6 +44,7 @@ var _dist_btn: Button
|
||||
var _heal_btn: Button
|
||||
var _notice: Label
|
||||
var _role_popup: Control = null
|
||||
var _mobile_mode := false
|
||||
|
||||
func setup(m2client: Node, parent: Node, dlg: Node = null) -> void:
|
||||
client = m2client
|
||||
@@ -66,6 +67,15 @@ func close() -> void:
|
||||
if _root:
|
||||
_root.visible = false
|
||||
|
||||
# MobileUiRoot owns the compact party strip beneath the player avatar. Keep
|
||||
# this controller alive for server updates, but hide its desktop window.
|
||||
func set_mobile_mode(enabled: bool) -> void:
|
||||
_mobile_mode = enabled
|
||||
if enabled:
|
||||
_dismiss_role_popup()
|
||||
if _root:
|
||||
_root.visible = false
|
||||
|
||||
# --- 로컬 플레이어가 파티장인가 ---
|
||||
func _local_is_leader() -> bool:
|
||||
if client == null or not client.has_method("get_main_vid"):
|
||||
@@ -86,6 +96,9 @@ func refresh() -> void:
|
||||
_list.remove_child(c)
|
||||
c.queue_free()
|
||||
var members: Array = client.get_party()
|
||||
if _mobile_mode:
|
||||
_root.visible = false
|
||||
return
|
||||
_root.visible = not members.is_empty()
|
||||
if members.is_empty():
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user