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