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