| | 1 | | using System; |
| | 2 | | using DCL; |
| | 3 | | using DCL.Chat.HUD; |
| | 4 | | using DCL.Chat.Notifications; |
| | 5 | | using DCl.Social.Friends; |
| | 6 | | using DCL.Social.Friends; |
| | 7 | | using TMPro; |
| | 8 | | using UnityEngine; |
| | 9 | | using UnityEngine.EventSystems; |
| | 10 | |
|
| | 11 | | public class TaskbarHUDController : IHUD |
| | 12 | | { |
| | 13 | | private readonly IChatController chatController; |
| | 14 | | private readonly IFriendsController friendsController; |
| | 15 | |
|
| | 16 | | [Serializable] |
| | 17 | | public struct Configuration |
| | 18 | | { |
| | 19 | | public bool enableVoiceChat; |
| | 20 | | public bool enableQuestPanel; |
| | 21 | | } |
| | 22 | |
|
| | 23 | | public TaskbarHUDView view; |
| | 24 | | public WorldChatWindowController worldChatWindowHud; |
| | 25 | | public PrivateChatWindowController privateChatWindow; |
| | 26 | | public PublicChatWindowController publicChatWindow; |
| | 27 | | public ChatChannelHUDController channelChatWindow; |
| | 28 | | public FriendsHUDController friendsHud; |
| | 29 | | public VoiceChatWindowController voiceChatHud; |
| | 30 | |
|
| | 31 | | private IMouseCatcher mouseCatcher; |
| | 32 | | private InputAction_Trigger toggleFriendsTrigger; |
| | 33 | | private InputAction_Trigger closeWindowTrigger; |
| | 34 | | private InputAction_Trigger toggleWorldChatTrigger; |
| | 35 | | private Transform experiencesViewerTransform; |
| | 36 | | private Transform notificationViewerTransform; |
| | 37 | | private Transform topNotificationViewerTransform; |
| | 38 | | private IHUD chatToggleTargetWindow; |
| | 39 | | private IHUD chatInputTargetWindow; |
| | 40 | | private IHUD chatBackWindow; |
| | 41 | | private SearchChannelsWindowController searchChannelsHud; |
| | 42 | | private CreateChannelWindowController channelCreationWindow; |
| | 43 | | private LeaveChannelConfirmationWindowController channelLeaveWindow; |
| | 44 | |
|
| | 45 | | public event Action OnAnyTaskbarButtonClicked; |
| | 46 | |
|
| 0 | 47 | | public RectTransform socialTooltipReference => view.socialTooltipReference; |
| | 48 | |
|
| 12 | 49 | | internal BaseVariable<bool> isEmotesWheelInitialized => DataStore.i.emotesCustomization.isWheelInitialized; |
| 11 | 50 | | internal BaseVariable<bool> isEmotesVisible => DataStore.i.HUDs.emotesVisible; |
| 0 | 51 | | internal BaseVariable<bool> emoteJustTriggeredFromShortcut => DataStore.i.HUDs.emoteJustTriggeredFromShortcut; |
| 12 | 52 | | internal BaseVariable<Transform> isExperiencesViewerInitialized => DataStore.i.experiencesViewer.isInitialized; |
| 8 | 53 | | internal BaseVariable<Transform> notificationPanelTransform => DataStore.i.HUDs.notificationPanelTransform; |
| 8 | 54 | | internal BaseVariable<Transform> topNotificationPanelTransform => DataStore.i.HUDs.topNotificationPanelTransform; |
| 15 | 55 | | internal BaseVariable<bool> isExperiencesViewerOpen => DataStore.i.experiencesViewer.isOpen; |
| 12 | 56 | | internal BaseVariable<int> numOfLoadedExperiences => DataStore.i.experiencesViewer.numOfLoadedExperiences; |
| 4 | 57 | | internal BaseVariable<string> openPrivateChat => DataStore.i.HUDs.openPrivateChat; |
| 0 | 58 | | internal BaseVariable<string> openedChat => DataStore.i.HUDs.openedChat; |
| 3 | 59 | | internal BaseVariable<bool> isPromoteChannelsToastVisible => DataStore.i.channels.isPromoteToastVisible; |
| | 60 | |
|
| 4 | 61 | | public TaskbarHUDController(IChatController chatController, IFriendsController friendsController) |
| | 62 | | { |
| 4 | 63 | | this.chatController = chatController; |
| 4 | 64 | | this.friendsController = friendsController; |
| 4 | 65 | | } |
| | 66 | |
|
| | 67 | | protected virtual TaskbarHUDView CreateView() |
| | 68 | | { |
| 4 | 69 | | return TaskbarHUDView.Create(); |
| | 70 | | } |
| | 71 | |
|
| | 72 | | public void Initialize(IMouseCatcher mouseCatcher) |
| | 73 | | { |
| 4 | 74 | | this.mouseCatcher = mouseCatcher; |
| | 75 | |
|
| 4 | 76 | | view = CreateView(); |
| | 77 | |
|
| 4 | 78 | | if (mouseCatcher != null) |
| | 79 | | { |
| 0 | 80 | | mouseCatcher.OnMouseLock -= MouseCatcher_OnMouseLock; |
| 0 | 81 | | mouseCatcher.OnMouseUnlock -= MouseCatcher_OnMouseUnlock; |
| 0 | 82 | | mouseCatcher.OnMouseLock += MouseCatcher_OnMouseLock; |
| 0 | 83 | | mouseCatcher.OnMouseUnlock += MouseCatcher_OnMouseUnlock; |
| | 84 | | } |
| | 85 | |
|
| 4 | 86 | | view.leftWindowContainerLayout.enabled = false; |
| | 87 | |
|
| 4 | 88 | | view.OnChatToggle += HandleChatToggle; |
| 4 | 89 | | view.OnFriendsToggle += HandleFriendsToggle; |
| 4 | 90 | | view.OnEmotesToggle += HandleEmotesToggle; |
| 4 | 91 | | view.OnExperiencesToggle += HandleExperiencesToggle; |
| 4 | 92 | | view.OnVoiceChatToggle += HandleVoiceChatToggle; |
| | 93 | |
|
| 4 | 94 | | toggleFriendsTrigger = Resources.Load<InputAction_Trigger>("ToggleFriends"); |
| 4 | 95 | | toggleFriendsTrigger.OnTriggered -= ToggleFriendsTrigger_OnTriggered; |
| 4 | 96 | | toggleFriendsTrigger.OnTriggered += ToggleFriendsTrigger_OnTriggered; |
| | 97 | |
|
| 4 | 98 | | closeWindowTrigger = Resources.Load<InputAction_Trigger>("CloseWindow"); |
| 4 | 99 | | closeWindowTrigger.OnTriggered -= CloseWindowTrigger_OnTriggered; |
| 4 | 100 | | closeWindowTrigger.OnTriggered += CloseWindowTrigger_OnTriggered; |
| | 101 | |
|
| 4 | 102 | | toggleWorldChatTrigger = Resources.Load<InputAction_Trigger>("ToggleWorldChat"); |
| 4 | 103 | | toggleWorldChatTrigger.OnTriggered -= ToggleWorldChatTrigger_OnTriggered; |
| 4 | 104 | | toggleWorldChatTrigger.OnTriggered += ToggleWorldChatTrigger_OnTriggered; |
| | 105 | |
|
| 4 | 106 | | isEmotesWheelInitialized.OnChange += InitializeEmotesSelector; |
| 4 | 107 | | InitializeEmotesSelector(isEmotesWheelInitialized.Get(), false); |
| 4 | 108 | | isEmotesVisible.OnChange += IsEmotesVisibleChanged; |
| | 109 | |
|
| 4 | 110 | | isExperiencesViewerOpen.OnChange += IsExperiencesViewerOpenChanged; |
| | 111 | |
|
| 4 | 112 | | view.leftWindowContainerAnimator.Show(); |
| | 113 | |
|
| 4 | 114 | | CommonScriptableObjects.isTaskbarHUDInitialized.Set(true); |
| | 115 | |
|
| 4 | 116 | | isExperiencesViewerInitialized.OnChange += InitializeExperiencesViewer; |
| 4 | 117 | | InitializeExperiencesViewer(isExperiencesViewerInitialized.Get(), null); |
| | 118 | |
|
| 4 | 119 | | notificationPanelTransform.OnChange += InitializeNotificationPanel; |
| 4 | 120 | | InitializeNotificationPanel(notificationPanelTransform.Get(), null); |
| | 121 | |
|
| 4 | 122 | | topNotificationPanelTransform.OnChange += InitializeTopNotificationPanel; |
| 4 | 123 | | InitializeTopNotificationPanel(topNotificationPanelTransform.Get(), null); |
| | 124 | |
|
| 4 | 125 | | numOfLoadedExperiences.OnChange += NumOfLoadedExperiencesChanged; |
| 4 | 126 | | NumOfLoadedExperiencesChanged(numOfLoadedExperiences.Get(), 0); |
| | 127 | |
|
| 4 | 128 | | openPrivateChat.OnChange += OpenPrivateChatFromPassport; |
| 4 | 129 | | } |
| | 130 | |
|
| | 131 | | private void HandleFriendsToggle(bool show) |
| | 132 | | { |
| 3 | 133 | | if (show) |
| 2 | 134 | | OpenFriendsWindow(); |
| | 135 | | else |
| | 136 | | { |
| 1 | 137 | | friendsHud?.SetVisibility(false); |
| 1 | 138 | | ToggleOffChatIcon(); |
| | 139 | | } |
| | 140 | |
|
| 3 | 141 | | OnAnyTaskbarButtonClicked?.Invoke(); |
| 0 | 142 | | } |
| | 143 | |
|
| | 144 | | private void HandleEmotesToggle(bool show) |
| | 145 | | { |
| 0 | 146 | | if (show && emoteJustTriggeredFromShortcut.Get()) |
| | 147 | | { |
| 0 | 148 | | emoteJustTriggeredFromShortcut.Set(false); |
| 0 | 149 | | return; |
| | 150 | | } |
| | 151 | |
|
| 0 | 152 | | if (show) |
| | 153 | | { |
| 0 | 154 | | ToggleOffChatIcon(); |
| 0 | 155 | | ShowEmotes(); |
| | 156 | | } |
| | 157 | | else |
| | 158 | | { |
| 0 | 159 | | view.ToggleOff(TaskbarHUDView.TaskbarButtonType.Emotes); |
| 0 | 160 | | isEmotesVisible.Set(false); |
| 0 | 161 | | ToggleOffChatIcon(); |
| | 162 | | } |
| | 163 | |
|
| 0 | 164 | | OnAnyTaskbarButtonClicked?.Invoke(); |
| 0 | 165 | | } |
| | 166 | |
|
| | 167 | | private void ShowEmotes() |
| | 168 | | { |
| 0 | 169 | | worldChatWindowHud.SetVisibility(false); |
| 0 | 170 | | privateChatWindow.SetVisibility(false); |
| 0 | 171 | | channelChatWindow.SetVisibility(false); |
| 0 | 172 | | friendsHud?.SetVisibility(false); |
| 0 | 173 | | searchChannelsHud.SetVisibility(false); |
| 0 | 174 | | isExperiencesViewerOpen.Set(false); |
| 0 | 175 | | voiceChatHud?.SetVisibility(false); |
| 0 | 176 | | isEmotesVisible.Set(true); |
| 0 | 177 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Emotes); |
| 0 | 178 | | } |
| | 179 | |
|
| | 180 | | private void HandleExperiencesToggle(bool show) |
| | 181 | | { |
| 0 | 182 | | if (show) |
| 0 | 183 | | ShowExperiences(); |
| | 184 | | else |
| | 185 | | { |
| 0 | 186 | | isExperiencesViewerOpen.Set(false); |
| 0 | 187 | | ToggleOffChatIcon(); |
| | 188 | | } |
| | 189 | |
|
| 0 | 190 | | OnAnyTaskbarButtonClicked?.Invoke(); |
| 0 | 191 | | } |
| | 192 | |
|
| | 193 | | private void HandleVoiceChatToggle(bool show) |
| | 194 | | { |
| 0 | 195 | | if (show) |
| 0 | 196 | | OpenVoiceChatWindow(); |
| | 197 | | else |
| 0 | 198 | | voiceChatHud?.SetVisibility(false); |
| 0 | 199 | | OnAnyTaskbarButtonClicked?.Invoke(); |
| 0 | 200 | | } |
| | 201 | |
|
| | 202 | | private void ShowExperiences() |
| | 203 | | { |
| 0 | 204 | | worldChatWindowHud.SetVisibility(false); |
| 0 | 205 | | privateChatWindow.SetVisibility(false); |
| 0 | 206 | | publicChatWindow.SetVisibility(false); |
| 0 | 207 | | channelChatWindow.SetVisibility(false); |
| 0 | 208 | | searchChannelsHud.SetVisibility(false); |
| 0 | 209 | | friendsHud?.SetVisibility(false); |
| 0 | 210 | | isEmotesVisible.Set(false); |
| 0 | 211 | | voiceChatHud?.SetVisibility(false); |
| 0 | 212 | | isExperiencesViewerOpen.Set(true); |
| 0 | 213 | | isPromoteChannelsToastVisible.Set(false); |
| 0 | 214 | | } |
| | 215 | |
|
| | 216 | | private void ToggleFriendsTrigger_OnTriggered(DCLAction_Trigger action) |
| | 217 | | { |
| 0 | 218 | | if (friendsHud == null) return; |
| | 219 | |
|
| 0 | 220 | | bool anyInputFieldIsSelected = EventSystem.current != null && |
| | 221 | | EventSystem.current.currentSelectedGameObject != null && |
| | 222 | | EventSystem.current.currentSelectedGameObject.GetComponent<TMP_InputField>() != |
| | 223 | | null; |
| | 224 | |
|
| 0 | 225 | | if (anyInputFieldIsSelected) return; |
| | 226 | |
|
| 0 | 227 | | mouseCatcher.UnlockCursor(); |
| | 228 | |
|
| 0 | 229 | | if (!friendsHud.View.IsActive()) |
| | 230 | | { |
| 0 | 231 | | view.leftWindowContainerAnimator.Show(); |
| 0 | 232 | | OpenFriendsWindow(); |
| | 233 | | } |
| | 234 | | else |
| | 235 | | { |
| 0 | 236 | | CloseFriendsWindow(); |
| 0 | 237 | | ToggleOffChatIcon(); |
| | 238 | | } |
| 0 | 239 | | } |
| | 240 | |
|
| | 241 | | private void ToggleWorldChatTrigger_OnTriggered(DCLAction_Trigger action) |
| | 242 | | { |
| 0 | 243 | | bool anyInputFieldIsSelected = EventSystem.current != null && |
| | 244 | | EventSystem.current.currentSelectedGameObject != null && |
| | 245 | | EventSystem.current.currentSelectedGameObject.GetComponent<TMP_InputField>() != |
| | 246 | | null; |
| | 247 | |
|
| 0 | 248 | | if (anyInputFieldIsSelected) return; |
| | 249 | |
|
| 0 | 250 | | mouseCatcher.UnlockCursor(); |
| 0 | 251 | | chatBackWindow = worldChatWindowHud; |
| | 252 | |
|
| 0 | 253 | | if (!worldChatWindowHud.View.IsActive |
| | 254 | | && !privateChatWindow.View.IsActive |
| | 255 | | && !publicChatWindow.View.IsActive) |
| 0 | 256 | | OpenLastActiveChatWindow(chatInputTargetWindow); |
| 0 | 257 | | } |
| | 258 | |
|
| | 259 | | private void CloseWindowTrigger_OnTriggered(DCLAction_Trigger action) |
| | 260 | | { |
| 0 | 261 | | if (mouseCatcher.isLocked) return; |
| | 262 | |
|
| 0 | 263 | | if (publicChatWindow.View.IsActive || |
| | 264 | | channelChatWindow.View.IsActive || |
| | 265 | | privateChatWindow.View.IsActive) |
| | 266 | | { |
| 0 | 267 | | publicChatWindow.SetVisibility(false); |
| 0 | 268 | | worldChatWindowHud.SetVisibility(true); |
| 0 | 269 | | chatToggleTargetWindow = worldChatWindowHud; |
| 0 | 270 | | chatInputTargetWindow = publicChatWindow; |
| | 271 | | } |
| | 272 | | else |
| | 273 | | { |
| 0 | 274 | | worldChatWindowHud.SetVisibility(false); |
| 0 | 275 | | view.ToggleOff(TaskbarHUDView.TaskbarButtonType.Chat); |
| | 276 | | } |
| | 277 | |
|
| 0 | 278 | | publicChatWindow.SetVisibility(false); |
| 0 | 279 | | privateChatWindow.SetVisibility(false); |
| 0 | 280 | | channelChatWindow.SetVisibility(false); |
| 0 | 281 | | CloseFriendsWindow(); |
| 0 | 282 | | CloseVoiceChatWindow(); |
| 0 | 283 | | isEmotesVisible.Set(false); |
| 0 | 284 | | isExperiencesViewerOpen.Set(false); |
| 0 | 285 | | } |
| | 286 | |
|
| | 287 | | private void HandleChatToggle(bool show) |
| | 288 | | { |
| 1 | 289 | | if (show) |
| | 290 | | { |
| 1 | 291 | | chatBackWindow = worldChatWindowHud; |
| 1 | 292 | | OpenWorldChatWindow(); |
| | 293 | | } |
| | 294 | | else |
| | 295 | | { |
| 0 | 296 | | CloseAnyChatWindow(); |
| | 297 | | } |
| | 298 | |
|
| 1 | 299 | | OnAnyTaskbarButtonClicked?.Invoke(); |
| 0 | 300 | | } |
| | 301 | |
|
| | 302 | | private void MouseCatcher_OnMouseUnlock() |
| | 303 | | { |
| 0 | 304 | | } |
| | 305 | |
|
| | 306 | | private void MouseCatcher_OnMouseLock() |
| | 307 | | { |
| 0 | 308 | | CloseFriendsWindow(); |
| 0 | 309 | | CloseChatList(); |
| 0 | 310 | | CloseVoiceChatWindow(); |
| 0 | 311 | | isExperiencesViewerOpen.Set(false); |
| | 312 | |
|
| 0 | 313 | | if (!privateChatWindow.View.IsActive |
| | 314 | | && !publicChatWindow.View.IsActive |
| | 315 | | && !channelChatWindow.View.IsActive) |
| 0 | 316 | | ToggleOffChatIcon(); |
| 0 | 317 | | } |
| | 318 | |
|
| | 319 | | public void AddWorldChatWindow(WorldChatWindowController controller) |
| | 320 | | { |
| 2 | 321 | | if (controller?.View == null) |
| | 322 | | { |
| 0 | 323 | | Debug.LogWarning("AddChatWindow >>> World Chat Window doesn't exist yet!"); |
| 0 | 324 | | return; |
| | 325 | | } |
| | 326 | |
|
| 2 | 327 | | if (controller.View.Transform.parent == view.leftWindowContainer) return; |
| | 328 | |
|
| 2 | 329 | | controller.View.Transform.SetParent(view.leftWindowContainer, false); |
| 2 | 330 | | notificationViewerTransform?.SetAsLastSibling(); |
| 2 | 331 | | topNotificationViewerTransform?.SetAsFirstSibling(); |
| 2 | 332 | | experiencesViewerTransform?.SetAsLastSibling(); |
| | 333 | |
|
| 2 | 334 | | worldChatWindowHud = controller; |
| | 335 | |
|
| 2 | 336 | | view.ShowChatButton(); |
| 2 | 337 | | worldChatWindowHud.OnCloseView += ToggleOffChatIcon; |
| 2 | 338 | | worldChatWindowHud.OnOpenChannelCreation += OpenChannelCreation; |
| 2 | 339 | | worldChatWindowHud.OnOpenChannelLeave += OpenChannelLeaveConfirmation; |
| 2 | 340 | | } |
| | 341 | |
|
| 1 | 342 | | private void ToggleOffChatIcon() => view.ToggleOff(TaskbarHUDView.TaskbarButtonType.Chat); |
| | 343 | |
|
| | 344 | | private void OpenFriendsWindow() |
| | 345 | | { |
| 2 | 346 | | worldChatWindowHud.SetVisibility(false); |
| 2 | 347 | | privateChatWindow.SetVisibility(false); |
| 2 | 348 | | publicChatWindow.SetVisibility(false); |
| 2 | 349 | | channelChatWindow?.SetVisibility(false); |
| 2 | 350 | | searchChannelsHud.SetVisibility(false); |
| 2 | 351 | | isExperiencesViewerOpen.Set(false); |
| 2 | 352 | | isEmotesVisible.Set(false); |
| 2 | 353 | | voiceChatHud?.SetVisibility(false); |
| 2 | 354 | | friendsHud?.SetVisibility(true); |
| 2 | 355 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Friends); |
| 2 | 356 | | chatBackWindow = friendsHud; |
| 2 | 357 | | isPromoteChannelsToastVisible.Set(false); |
| 2 | 358 | | } |
| | 359 | |
|
| | 360 | | private void CloseFriendsWindow() |
| | 361 | | { |
| 0 | 362 | | friendsHud?.SetVisibility(false); |
| 0 | 363 | | view.ToggleOff(TaskbarHUDView.TaskbarButtonType.Friends); |
| 0 | 364 | | } |
| | 365 | |
|
| | 366 | | private void OpenPrivateChatFromPassport(string current, string previous) |
| | 367 | | { |
| 0 | 368 | | if (current == "" || current == previous) |
| 0 | 369 | | return; |
| | 370 | |
|
| 0 | 371 | | OpenPrivateChat(current); |
| 0 | 372 | | openPrivateChat.Set("", false); |
| 0 | 373 | | } |
| | 374 | |
|
| | 375 | | public void OpenPrivateChat(string userId) |
| | 376 | | { |
| 0 | 377 | | worldChatWindowHud.SetVisibility(false); |
| 0 | 378 | | publicChatWindow.SetVisibility(false); |
| 0 | 379 | | channelChatWindow.SetVisibility(false); |
| 0 | 380 | | searchChannelsHud.SetVisibility(false); |
| 0 | 381 | | friendsHud?.SetVisibility(false); |
| 0 | 382 | | isExperiencesViewerOpen.Set(false); |
| 0 | 383 | | isEmotesVisible.Set(false); |
| 0 | 384 | | voiceChatHud?.SetVisibility(false); |
| 0 | 385 | | openedChat.Set(userId); |
| 0 | 386 | | privateChatWindow.Setup(userId); |
| 0 | 387 | | privateChatWindow.SetVisibility(true); |
| 0 | 388 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Chat); |
| 0 | 389 | | chatToggleTargetWindow = worldChatWindowHud; |
| 0 | 390 | | chatInputTargetWindow = privateChatWindow; |
| 0 | 391 | | } |
| | 392 | |
|
| | 393 | | private IHUD OpenLastActiveChatWindow(IHUD lastActiveWindow) |
| | 394 | | { |
| 0 | 395 | | worldChatWindowHud.SetVisibility(false); |
| 0 | 396 | | privateChatWindow.SetVisibility(false); |
| 0 | 397 | | publicChatWindow.SetVisibility(false); |
| 0 | 398 | | channelChatWindow?.SetVisibility(false); |
| 0 | 399 | | searchChannelsHud.SetVisibility(false); |
| 0 | 400 | | friendsHud?.SetVisibility(false); |
| 0 | 401 | | isEmotesVisible.Set(false); |
| 0 | 402 | | isExperiencesViewerOpen.Set(false); |
| 0 | 403 | | voiceChatHud?.SetVisibility(false); |
| 0 | 404 | | isPromoteChannelsToastVisible.Set(false); |
| | 405 | |
|
| | 406 | | IHUD visibleWindow; |
| | 407 | |
|
| 0 | 408 | | if (lastActiveWindow == publicChatWindow) |
| | 409 | | { |
| 0 | 410 | | publicChatWindow.SetVisibility(true, true); |
| 0 | 411 | | visibleWindow = publicChatWindow; |
| | 412 | | } |
| 0 | 413 | | else if (lastActiveWindow != null) |
| | 414 | | { |
| 0 | 415 | | lastActiveWindow.SetVisibility(true); |
| 0 | 416 | | visibleWindow = lastActiveWindow; |
| | 417 | | } |
| | 418 | | else |
| | 419 | | { |
| 0 | 420 | | publicChatWindow.SetVisibility(true, true); |
| 0 | 421 | | visibleWindow = publicChatWindow; |
| | 422 | | } |
| | 423 | |
|
| 0 | 424 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Chat); |
| | 425 | |
|
| 0 | 426 | | return visibleWindow; |
| | 427 | | } |
| | 428 | |
|
| | 429 | | private void OpenWorldChatWindow() |
| | 430 | | { |
| 1 | 431 | | privateChatWindow.SetVisibility(false); |
| 1 | 432 | | publicChatWindow.SetVisibility(false); |
| 1 | 433 | | channelChatWindow?.SetVisibility(false); |
| 1 | 434 | | searchChannelsHud.SetVisibility(false); |
| 1 | 435 | | friendsHud?.SetVisibility(false); |
| 1 | 436 | | isEmotesVisible.Set(false); |
| 1 | 437 | | isExperiencesViewerOpen.Set(false); |
| 1 | 438 | | voiceChatHud?.SetVisibility(false); |
| 1 | 439 | | isPromoteChannelsToastVisible.Set(false); |
| 1 | 440 | | worldChatWindowHud.SetVisibility(true); |
| 1 | 441 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Chat); |
| 1 | 442 | | } |
| | 443 | |
|
| | 444 | | private void CloseAnyChatWindow() |
| | 445 | | { |
| 0 | 446 | | worldChatWindowHud.SetVisibility(false); |
| 0 | 447 | | privateChatWindow.SetVisibility(false); |
| 0 | 448 | | publicChatWindow.SetVisibility(false); |
| 0 | 449 | | channelChatWindow.SetVisibility(false); |
| 0 | 450 | | searchChannelsHud.SetVisibility(false); |
| 0 | 451 | | view.ToggleOff(TaskbarHUDView.TaskbarButtonType.Chat); |
| 0 | 452 | | } |
| | 453 | |
|
| | 454 | | public void OpenChannelChat(string channelId) |
| | 455 | | { |
| 0 | 456 | | openedChat.Set(channelId); |
| 0 | 457 | | channelChatWindow?.Setup(channelId); |
| 0 | 458 | | channelChatWindow?.SetVisibility(true); |
| 0 | 459 | | publicChatWindow?.SetVisibility(false); |
| 0 | 460 | | worldChatWindowHud?.SetVisibility(false); |
| 0 | 461 | | privateChatWindow?.SetVisibility(false); |
| 0 | 462 | | searchChannelsHud.SetVisibility(false); |
| 0 | 463 | | friendsHud?.SetVisibility(false); |
| 0 | 464 | | isExperiencesViewerOpen?.Set(false); |
| 0 | 465 | | isEmotesVisible?.Set(false); |
| 0 | 466 | | voiceChatHud?.SetVisibility(false); |
| | 467 | |
|
| 0 | 468 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Chat); |
| | 469 | |
|
| 0 | 470 | | chatToggleTargetWindow = worldChatWindowHud; |
| 0 | 471 | | chatInputTargetWindow = channelChatWindow; |
| 0 | 472 | | } |
| | 473 | |
|
| | 474 | |
|
| | 475 | | public void OpenPublicChat(string channelId, bool focusInputField) |
| | 476 | | { |
| 0 | 477 | | openedChat.Set(channelId); |
| 0 | 478 | | publicChatWindow?.Setup(channelId); |
| 0 | 479 | | publicChatWindow?.SetVisibility(true, focusInputField); |
| 0 | 480 | | channelChatWindow?.SetVisibility(false); |
| 0 | 481 | | worldChatWindowHud?.SetVisibility(false); |
| 0 | 482 | | privateChatWindow?.SetVisibility(false); |
| 0 | 483 | | searchChannelsHud?.SetVisibility(false); |
| 0 | 484 | | friendsHud?.SetVisibility(false); |
| 0 | 485 | | isExperiencesViewerOpen?.Set(false); |
| 0 | 486 | | isEmotesVisible?.Set(false); |
| 0 | 487 | | voiceChatHud?.SetVisibility(false); |
| | 488 | |
|
| 0 | 489 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Chat); |
| | 490 | |
|
| 0 | 491 | | chatToggleTargetWindow = worldChatWindowHud; |
| 0 | 492 | | chatInputTargetWindow = publicChatWindow; |
| 0 | 493 | | } |
| | 494 | |
|
| | 495 | | private void OpenChatList() |
| | 496 | | { |
| 0 | 497 | | privateChatWindow.SetVisibility(false); |
| 0 | 498 | | publicChatWindow.SetVisibility(false); |
| 0 | 499 | | channelChatWindow.SetVisibility(false); |
| 0 | 500 | | searchChannelsHud.SetVisibility(false); |
| 0 | 501 | | friendsHud?.SetVisibility(false); |
| 0 | 502 | | isExperiencesViewerOpen.Set(false); |
| 0 | 503 | | isEmotesVisible.Set(false); |
| 0 | 504 | | voiceChatHud?.SetVisibility(false); |
| 0 | 505 | | worldChatWindowHud.SetVisibility(true); |
| 0 | 506 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Chat); |
| | 507 | |
|
| 0 | 508 | | chatToggleTargetWindow = worldChatWindowHud; |
| 0 | 509 | | } |
| | 510 | |
|
| | 511 | | private void CloseChatList() |
| | 512 | | { |
| 0 | 513 | | if (!worldChatWindowHud.View.IsActive) return; |
| 0 | 514 | | worldChatWindowHud.SetVisibility(false); |
| 0 | 515 | | view.ToggleOff(TaskbarHUDView.TaskbarButtonType.Chat); |
| 0 | 516 | | } |
| | 517 | |
|
| | 518 | | private void OpenVoiceChatWindow() |
| | 519 | | { |
| 0 | 520 | | worldChatWindowHud.SetVisibility(false); |
| 0 | 521 | | privateChatWindow.SetVisibility(false); |
| 0 | 522 | | publicChatWindow.SetVisibility(false); |
| 0 | 523 | | channelChatWindow.SetVisibility(false); |
| 0 | 524 | | searchChannelsHud.SetVisibility(false); |
| 0 | 525 | | isExperiencesViewerOpen.Set(false); |
| 0 | 526 | | isEmotesVisible.Set(false); |
| 0 | 527 | | friendsHud?.SetVisibility(false); |
| 0 | 528 | | voiceChatHud?.SetVisibility(true); |
| 0 | 529 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.VoiceChat); |
| 0 | 530 | | isPromoteChannelsToastVisible.Set(false); |
| 0 | 531 | | } |
| | 532 | |
|
| | 533 | | private void CloseVoiceChatWindow() |
| | 534 | | { |
| 0 | 535 | | voiceChatHud?.SetVisibility(false); |
| 0 | 536 | | view.ToggleOff(TaskbarHUDView.TaskbarButtonType.VoiceChat); |
| 0 | 537 | | } |
| | 538 | |
|
| | 539 | | public void AddPrivateChatWindow(PrivateChatWindowController controller) |
| | 540 | | { |
| 1 | 541 | | if (controller?.View == null) |
| | 542 | | { |
| 0 | 543 | | Debug.LogWarning("AddPrivateChatWindow >>> Private Chat Window doesn't exist yet!"); |
| 0 | 544 | | return; |
| | 545 | | } |
| | 546 | |
|
| 1 | 547 | | if (controller.View.Transform.parent == view.leftWindowContainer) |
| 0 | 548 | | return; |
| | 549 | |
|
| 1 | 550 | | controller.View.Transform.SetParent(view.leftWindowContainer, false); |
| 1 | 551 | | notificationViewerTransform?.SetAsLastSibling(); |
| 1 | 552 | | topNotificationViewerTransform?.SetAsFirstSibling(); |
| 1 | 553 | | experiencesViewerTransform?.SetAsLastSibling(); |
| | 554 | |
|
| 1 | 555 | | privateChatWindow = controller; |
| | 556 | |
|
| 1 | 557 | | controller.OnClosed += ToggleOffChatIcon; |
| 1 | 558 | | } |
| | 559 | |
|
| | 560 | | public void AddPublicChatChannel(PublicChatWindowController controller) |
| | 561 | | { |
| 1 | 562 | | if (controller?.View == null) |
| | 563 | | { |
| 0 | 564 | | Debug.LogWarning("AddPublicChatChannel >>> Public Chat Window doesn't exist yet!"); |
| 0 | 565 | | return; |
| | 566 | | } |
| | 567 | |
|
| 1 | 568 | | if (controller.View.Transform.parent == view.leftWindowContainer) return; |
| | 569 | |
|
| 1 | 570 | | controller.View.Transform.SetParent(view.leftWindowContainer, false); |
| 1 | 571 | | notificationViewerTransform?.SetAsLastSibling(); |
| 1 | 572 | | topNotificationViewerTransform?.SetAsFirstSibling(); |
| 1 | 573 | | experiencesViewerTransform?.SetAsLastSibling(); |
| | 574 | |
|
| 1 | 575 | | publicChatWindow = controller; |
| | 576 | |
|
| 1 | 577 | | controller.OnClosed += ToggleOffChatIcon; |
| 1 | 578 | | } |
| | 579 | |
|
| | 580 | | private void HandlePublicChannelPreviewModeChanged(bool isPreviewMode) |
| | 581 | | { |
| 0 | 582 | | if (!publicChatWindow.View.IsActive) return; |
| 0 | 583 | | if (isPreviewMode) |
| 0 | 584 | | view.ToggleOff(TaskbarHUDView.TaskbarButtonType.Chat); |
| | 585 | | else |
| 0 | 586 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Chat); |
| 0 | 587 | | } |
| | 588 | |
|
| | 589 | | private void HandleChannelPreviewModeChanged(bool isPreviewMode) |
| | 590 | | { |
| 0 | 591 | | if (!channelChatWindow.View.IsActive) return; |
| 0 | 592 | | if (isPreviewMode) |
| 0 | 593 | | view.ToggleOff(TaskbarHUDView.TaskbarButtonType.Chat); |
| | 594 | | else |
| 0 | 595 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Chat); |
| 0 | 596 | | } |
| | 597 | |
|
| | 598 | | private void HandlePrivateChannelPreviewMode(bool isPreviewMode) |
| | 599 | | { |
| 0 | 600 | | if (!privateChatWindow.View.IsActive) return; |
| 0 | 601 | | if (isPreviewMode) |
| 0 | 602 | | view.ToggleOff(TaskbarHUDView.TaskbarButtonType.Chat); |
| | 603 | | else |
| 0 | 604 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Chat); |
| 0 | 605 | | } |
| | 606 | |
|
| | 607 | | public void AddFriendsWindow(FriendsHUDController controller) |
| | 608 | | { |
| 3 | 609 | | if (controller?.View == null) |
| | 610 | | { |
| 0 | 611 | | Debug.LogWarning("AddFriendsWindow >>> Friends window doesn't exist yet!"); |
| 0 | 612 | | return; |
| | 613 | | } |
| | 614 | |
|
| 3 | 615 | | if (controller.View.Transform.parent == view.leftWindowContainer) |
| 0 | 616 | | return; |
| | 617 | |
|
| 3 | 618 | | controller.View.Transform.SetParent(view.leftWindowContainer, false); |
| 3 | 619 | | notificationViewerTransform?.SetAsLastSibling(); |
| 3 | 620 | | topNotificationViewerTransform?.SetAsFirstSibling(); |
| 3 | 621 | | experiencesViewerTransform?.SetAsLastSibling(); |
| | 622 | |
|
| 3 | 623 | | friendsHud = controller; |
| 3 | 624 | | view.ShowFriendsButton(); |
| 3 | 625 | | friendsHud.OnViewClosed += () => |
| | 626 | | { |
| 0 | 627 | | view.ToggleOff(TaskbarHUDView.TaskbarButtonType.Friends); |
| 0 | 628 | | ToggleOffChatIcon(); |
| 0 | 629 | | }; |
| 3 | 630 | | } |
| | 631 | |
|
| | 632 | | public void AddVoiceChatWindow(VoiceChatWindowController controller) |
| | 633 | | { |
| 1 | 634 | | if (controller?.VoiceChatWindowView == null) |
| | 635 | | { |
| 1 | 636 | | Debug.LogWarning("AddVoiceChatWindow >>> Voice Chat window doesn't exist yet!"); |
| 1 | 637 | | return; |
| | 638 | | } |
| | 639 | |
|
| 0 | 640 | | if (controller.VoiceChatWindowView.Transform.parent == view.leftWindowContainer) |
| 0 | 641 | | return; |
| | 642 | |
|
| 0 | 643 | | controller.VoiceChatWindowView.Transform.SetParent(view.leftWindowContainer, false); |
| | 644 | |
|
| 0 | 645 | | voiceChatHud = controller; |
| 0 | 646 | | view.ShowVoiceChatButton(); |
| 0 | 647 | | voiceChatHud.OnCloseView += () => view.ToggleOff(TaskbarHUDView.TaskbarButtonType.VoiceChat); |
| | 648 | |
|
| 0 | 649 | | if (controller?.VoiceChatBarView != null) |
| | 650 | | { |
| 0 | 651 | | controller.VoiceChatBarView.Transform.SetParent(view.altSectionContainer, false); |
| 0 | 652 | | controller.VoiceChatBarView.Transform.SetAsFirstSibling(); |
| | 653 | | } |
| 0 | 654 | | } |
| | 655 | |
|
| | 656 | | private void InitializeEmotesSelector(bool current, bool previous) |
| | 657 | | { |
| 8 | 658 | | if (!current) return; |
| 0 | 659 | | view.ShowEmotesButton(); |
| 0 | 660 | | } |
| | 661 | |
|
| 0 | 662 | | private void IsEmotesVisibleChanged(bool current, bool previous) => HandleEmotesToggle(current); |
| | 663 | |
|
| | 664 | | private void InitializeExperiencesViewer(Transform currentViewTransform, Transform previousViewTransform) |
| | 665 | | { |
| 4 | 666 | | if (currentViewTransform == null) |
| 4 | 667 | | return; |
| | 668 | |
|
| 0 | 669 | | experiencesViewerTransform = currentViewTransform; |
| 0 | 670 | | experiencesViewerTransform.SetParent(view.leftWindowContainer, false); |
| 0 | 671 | | experiencesViewerTransform.SetAsLastSibling(); |
| | 672 | |
|
| 0 | 673 | | view.ShowExperiencesButton(); |
| 0 | 674 | | } |
| | 675 | |
|
| | 676 | | private void InitializeNotificationPanel(Transform currentPanelTransform, Transform previousPanelTransform) |
| | 677 | | { |
| 4 | 678 | | if (currentPanelTransform == null) |
| 4 | 679 | | return; |
| | 680 | |
|
| 0 | 681 | | notificationViewerTransform = currentPanelTransform; |
| 0 | 682 | | notificationViewerTransform.SetParent(view.leftWindowContainer, false); |
| 0 | 683 | | notificationViewerTransform.SetAsLastSibling(); |
| 0 | 684 | | experiencesViewerTransform.SetAsLastSibling(); |
| 0 | 685 | | notificationViewerTransform.GetComponent<MainChatNotificationsComponentView>().OnClickedNotification += OpenClic |
| 0 | 686 | | } |
| | 687 | |
|
| | 688 | | private void InitializeTopNotificationPanel(Transform currentPanelTransform, Transform previousPanelTransform) |
| | 689 | | { |
| 4 | 690 | | if (currentPanelTransform == null) |
| 4 | 691 | | return; |
| | 692 | |
|
| 0 | 693 | | topNotificationViewerTransform = currentPanelTransform; |
| 0 | 694 | | topNotificationViewerTransform.SetParent(view.leftWindowContainer, false); |
| 0 | 695 | | topNotificationViewerTransform.SetAsFirstSibling(); |
| 0 | 696 | | topNotificationViewerTransform.GetComponent<TopNotificationComponentView>().OnClickedNotification += OpenClicked |
| 0 | 697 | | } |
| | 698 | |
|
| | 699 | | private void OpenClickedChat(string chatId) |
| | 700 | | { |
| | 701 | | const string nearbyChannelId = "nearby"; |
| | 702 | | const string conversationListId = "conversationList"; |
| | 703 | |
|
| 0 | 704 | | if (chatId == nearbyChannelId) |
| 0 | 705 | | OpenPublicChat(nearbyChannelId, true); |
| 0 | 706 | | else if (chatController.GetAllocatedChannel(chatId) != null) |
| | 707 | | { |
| 0 | 708 | | if(chatController.GetAllocatedChannel(chatId).Joined) |
| 0 | 709 | | OpenChannelChat(chatId); |
| | 710 | | else |
| 0 | 711 | | return; |
| | 712 | | } |
| 0 | 713 | | else if(chatId == conversationListId) |
| 0 | 714 | | OpenChatList(); |
| | 715 | | else |
| | 716 | | { |
| 0 | 717 | | if(friendsController.GetUserStatus(chatId).friendshipStatus == FriendshipStatus.FRIEND) |
| 0 | 718 | | OpenPrivateChat(chatId); |
| | 719 | | } |
| 0 | 720 | | } |
| | 721 | |
|
| | 722 | | private void IsExperiencesViewerOpenChanged(bool current, bool previous) |
| | 723 | | { |
| 0 | 724 | | if (current) |
| 0 | 725 | | return; |
| | 726 | |
|
| 0 | 727 | | view.ToggleOff(TaskbarHUDView.TaskbarButtonType.Experiences); |
| 0 | 728 | | ToggleOffChatIcon(); |
| 0 | 729 | | } |
| | 730 | |
|
| | 731 | | private void NumOfLoadedExperiencesChanged(int current, int previous) |
| | 732 | | { |
| 4 | 733 | | view.SetExperiencesVisibility(current > 0); |
| | 734 | |
|
| 4 | 735 | | if (current == 0) |
| 4 | 736 | | isExperiencesViewerOpen.Set(false); |
| 4 | 737 | | } |
| | 738 | |
|
| | 739 | | public void DisableFriendsWindow() |
| | 740 | | { |
| 0 | 741 | | view.friendsButton.transform.parent.gameObject.SetActive(false); |
| 0 | 742 | | } |
| | 743 | |
|
| | 744 | | public void Dispose() |
| | 745 | | { |
| 4 | 746 | | if (view != null) |
| | 747 | | { |
| 4 | 748 | | view.OnChatToggle -= HandleChatToggle; |
| 4 | 749 | | view.OnFriendsToggle -= HandleFriendsToggle; |
| 4 | 750 | | view.OnEmotesToggle -= HandleEmotesToggle; |
| 4 | 751 | | view.OnExperiencesToggle -= HandleExperiencesToggle; |
| 4 | 752 | | view.OnVoiceChatToggle -= HandleVoiceChatToggle; |
| | 753 | |
|
| 4 | 754 | | view.Destroy(); |
| | 755 | | } |
| | 756 | |
|
| 4 | 757 | | if (mouseCatcher != null) |
| | 758 | | { |
| 0 | 759 | | mouseCatcher.OnMouseLock -= MouseCatcher_OnMouseLock; |
| 0 | 760 | | mouseCatcher.OnMouseUnlock -= MouseCatcher_OnMouseUnlock; |
| | 761 | | } |
| | 762 | |
|
| 4 | 763 | | if (toggleFriendsTrigger != null) |
| 4 | 764 | | toggleFriendsTrigger.OnTriggered -= ToggleFriendsTrigger_OnTriggered; |
| | 765 | |
|
| 4 | 766 | | if (closeWindowTrigger != null) |
| 4 | 767 | | closeWindowTrigger.OnTriggered -= CloseWindowTrigger_OnTriggered; |
| | 768 | |
|
| 4 | 769 | | if (toggleWorldChatTrigger != null) |
| 4 | 770 | | toggleWorldChatTrigger.OnTriggered -= ToggleWorldChatTrigger_OnTriggered; |
| | 771 | |
|
| 4 | 772 | | isEmotesWheelInitialized.OnChange -= InitializeEmotesSelector; |
| 4 | 773 | | isEmotesVisible.OnChange -= IsEmotesVisibleChanged; |
| 4 | 774 | | isExperiencesViewerOpen.OnChange -= IsExperiencesViewerOpenChanged; |
| 4 | 775 | | isExperiencesViewerInitialized.OnChange -= InitializeExperiencesViewer; |
| 4 | 776 | | numOfLoadedExperiences.OnChange -= NumOfLoadedExperiencesChanged; |
| 4 | 777 | | } |
| | 778 | |
|
| | 779 | | private void SetVisibility(bool visible, bool previus) |
| | 780 | | { |
| 0 | 781 | | SetVisibility(visible); |
| 0 | 782 | | } |
| | 783 | |
|
| | 784 | | public void SetVisibility(bool visible) |
| | 785 | | { |
| 1 | 786 | | view.SetVisibility(visible); |
| 1 | 787 | | } |
| | 788 | |
|
| | 789 | | public void GoBackFromChat() |
| | 790 | | { |
| 0 | 791 | | if (chatBackWindow == friendsHud) |
| 0 | 792 | | OpenFriendsWindow(); |
| | 793 | | else |
| 0 | 794 | | OpenChatList(); |
| 0 | 795 | | } |
| | 796 | |
|
| | 797 | | public void AddChatChannel(ChatChannelHUDController controller) |
| | 798 | | { |
| 0 | 799 | | if (controller?.View == null) |
| | 800 | | { |
| 0 | 801 | | Debug.LogWarning("AddChatChannel >>> Chat Window doesn't exist yet!"); |
| 0 | 802 | | return; |
| | 803 | | } |
| | 804 | |
|
| 0 | 805 | | if (controller.View.Transform.parent == view.leftWindowContainer) return; |
| | 806 | |
|
| 0 | 807 | | controller.View.Transform.SetParent(view.leftWindowContainer, false); |
| 0 | 808 | | experiencesViewerTransform?.SetAsLastSibling(); |
| | 809 | |
|
| 0 | 810 | | channelChatWindow = controller; |
| | 811 | |
|
| 0 | 812 | | controller.OnClosed += ToggleOffChatIcon; |
| 0 | 813 | | controller.OnOpenChannelLeave += OpenChannelLeaveConfirmation; |
| 0 | 814 | | } |
| | 815 | |
|
| | 816 | | public void AddChannelSearch(SearchChannelsWindowController controller) |
| | 817 | | { |
| 1 | 818 | | if (controller.View.Transform.parent == view.leftWindowContainer) return; |
| | 819 | |
|
| 1 | 820 | | controller.View.Transform.SetParent(view.leftWindowContainer, false); |
| 1 | 821 | | experiencesViewerTransform?.SetAsLastSibling(); |
| | 822 | |
|
| 1 | 823 | | searchChannelsHud = controller; |
| | 824 | |
|
| 1 | 825 | | controller.OnClosed += () => |
| | 826 | | { |
| 0 | 827 | | controller.SetVisibility(false); |
| 0 | 828 | | ToggleOffChatIcon(); |
| 0 | 829 | | }; |
| 1 | 830 | | controller.OnBack += GoBackFromChat; |
| 1 | 831 | | controller.OnOpenChannelCreation += OpenChannelCreation; |
| 1 | 832 | | controller.OnOpenChannelLeave += OpenChannelLeaveConfirmation; |
| 1 | 833 | | } |
| | 834 | |
|
| | 835 | | public void AddChannelCreation(CreateChannelWindowController controller) |
| | 836 | | { |
| 0 | 837 | | if (controller.View.Transform.parent == view.fullScreenWindowContainer) return; |
| | 838 | |
|
| 0 | 839 | | controller.View.Transform.SetParent(view.fullScreenWindowContainer, false); |
| 0 | 840 | | experiencesViewerTransform?.SetAsLastSibling(); |
| | 841 | |
|
| 0 | 842 | | channelCreationWindow = controller; |
| | 843 | |
|
| 0 | 844 | | controller.OnNavigateToChannelWindow += channelId => |
| | 845 | | { |
| 0 | 846 | | OpenChannelChat(channelId); |
| 0 | 847 | | channelCreationWindow.SetVisibility(false); |
| 0 | 848 | | }; |
| 0 | 849 | | } |
| | 850 | |
|
| | 851 | | private void OpenChannelCreation() |
| | 852 | | { |
| 0 | 853 | | channelCreationWindow.SetVisibility(true); |
| 0 | 854 | | } |
| | 855 | |
|
| | 856 | | public void AddChannelLeaveConfirmation(LeaveChannelConfirmationWindowController controller) |
| | 857 | | { |
| 0 | 858 | | if (controller.View.Transform.parent == view.fullScreenWindowContainer) return; |
| | 859 | |
|
| 0 | 860 | | controller.View.Transform.SetParent(view.fullScreenWindowContainer, false); |
| 0 | 861 | | channelLeaveWindow = controller; |
| 0 | 862 | | } |
| | 863 | |
|
| | 864 | | private void OpenChannelLeaveConfirmation(string channelId) |
| | 865 | | { |
| 0 | 866 | | channelLeaveWindow.SetChannelToLeave(channelId); |
| 0 | 867 | | channelLeaveWindow.SetVisibility(true); |
| 0 | 868 | | } |
| | 869 | |
|
| | 870 | | public void OpenChannelSearch() |
| | 871 | | { |
| 0 | 872 | | privateChatWindow.SetVisibility(false); |
| 0 | 873 | | publicChatWindow.SetVisibility(false); |
| 0 | 874 | | channelChatWindow.SetVisibility(false); |
| 0 | 875 | | searchChannelsHud.SetVisibility(true); |
| 0 | 876 | | friendsHud?.SetVisibility(false); |
| 0 | 877 | | isExperiencesViewerOpen.Set(false); |
| 0 | 878 | | isEmotesVisible.Set(false); |
| 0 | 879 | | voiceChatHud?.SetVisibility(false); |
| 0 | 880 | | worldChatWindowHud.SetVisibility(false); |
| 0 | 881 | | view.ToggleOn(TaskbarHUDView.TaskbarButtonType.Chat); |
| 0 | 882 | | } |
| | 883 | | } |