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