feat: add nearby social interactions

This commit is contained in:
ANG-Server
2026-07-21 22:19:41 +08:00
parent 0bab768b14
commit 9dee47492c
43 changed files with 1499 additions and 77 deletions

View File

@@ -8,7 +8,7 @@ extends Control
# ============================================================================
const HUD_MARGIN: Vector2 = Vector2(16, 16)
const SHORTCUT_BAR_SIZE: Vector2 = Vector2(350, 86)
const SHORTCUT_BAR_SIZE: Vector2 = Vector2(406, 86)
const PLAYER_PROFILE_BUTTON_SIZE: Vector2 = Vector2(210, 78)
const PLAYER_AVATAR_SIZE: Vector2 = Vector2(58, 58)
const HUD_SEPARATION: int = 18
@@ -95,6 +95,7 @@ func _build_shortcut_bar() -> PanelContainer:
row.add_child(_create_shortcut_button("task", "任务", _on_task_pressed))
row.add_child(_create_shortcut_button("backpack", "背包", _on_backpack_pressed))
row.add_child(_create_shortcut_button("friends", "好友", _on_friends_pressed))
row.add_child(_create_shortcut_button("activity", "通知", _on_notifications_pressed))
row.add_child(_create_shortcut_button("settings", "设置", _on_settings_pressed))
return panel
@@ -379,6 +380,11 @@ func _on_map_pressed() -> void:
if eventSystem != null:
eventSystem.call("emit_event", EventNames.HUD_MAP_TOGGLE, {})
func _on_notifications_pressed() -> void:
var socialManager := get_node_or_null("/root/SocialManager")
if socialManager != null and socialManager.has_method("toggle_notifications"):
socialManager.call("toggle_notifications")
func _on_task_pressed() -> void:
_emit_status_message("任务入口稍后接入")