private void onNotificationDismissed(NotificationCompleteEnum complete, DNotification notificationData) { if (notificationData.AdjustRectPositionForNotification && notificationData.Type != DNotification.NotificationType.DailyComplete && notificationData.Type != DNotification.NotificationType.ActivityTracker) { moveUp(); } }
private void onNotificationStart(DNotification notificationData) { if (notificationData.AdjustRectPositionForNotification && notificationData.Type != DNotification.NotificationType.DailyComplete && notificationData.Type != DNotification.NotificationType.ActivityTracker) { moveDown(); } }
public void ShowNotification(DNotification notification) { if (isEnabled && !(notificationParentTransform == null)) { notificationQueue.Enqueue(notification); checkQueue(); } }
private void showNotification() { string tokenTranslation = Service.Get <Localizer>().GetTokenTranslation("GlobalUI.ReportingBans.SuccessNotification"); DNotification dNotification = new DNotification(); dNotification.PopUpDelayTime = 6f; dNotification.Message = tokenTranslation; Service.Get <TrayNotificationManager>().ShowNotification(dNotification); }
public override void Show(DNotification data) { base.Show(data); notificationData = (ActivityNotificationData)data.DataPayload; CoinRewardText.text = notificationData.CoinReward.ToString(); if (notificationData != null) { } }
private void checkQueue() { if (!showingNotification && notificationQueue.Count > 0) { showingNotification = true; displayingNotificationData = notificationQueue.Dequeue(); persistCurrentNotification = displayingNotificationData.PersistBetweenScenes; showNotification(); } }
public static void ShowTestNotification(string message = "Test message", float delayTime = 5f, bool containsButtons = false, DNotification.NotificationType type = DNotification.NotificationType.Generic) { DNotification dNotification = new DNotification(); dNotification.ContainsButtons = containsButtons; dNotification.Message = message; dNotification.PopUpDelayTime = delayTime; dNotification.Type = type; if (containsButtons) { TrayNotificationManager trayNotificationManager = Service.Get <TrayNotificationManager>(); trayNotificationManager.NotificationDismissed = (Action <NotificationCompleteEnum, DNotification>)Delegate.Combine(trayNotificationManager.NotificationDismissed, new Action <NotificationCompleteEnum, DNotification>(onNotificationDismissed)); } Service.Get <TrayNotificationManager>().ShowNotification(dNotification); }
public override void Show(DNotification data) { base.Show(data); ClubPenguin.Task.Task task = (ClubPenguin.Task.Task)data.DataPayload; if (task != null) { string subGroupByTaskName = Service.Get <TaskService>().GetSubGroupByTaskName(task.Id); Mascot mascot = Service.Get <MascotService>().GetMascot(subGroupByTaskName); MascotImage.color = mascot.Definition.NavigationArrowColor; if (ParticlesToTint != null) { ParticlesToTint.SetStartColor(mascot.Definition.NavigationArrowColor); } messageWithoutButtons.color = mascot.Definition.NavigationArrowColor; if (data.Type == DNotification.NotificationType.DailyComplete) { DailyChallengesListItem.ClaimDailyTaskReward(task); } } }
private static void onNotificationDismissed(NotificationCompleteEnum notificationOutcome, DNotification notification) { TrayNotificationManager trayNotificationManager = Service.Get <TrayNotificationManager>(); trayNotificationManager.NotificationDismissed = (Action <NotificationCompleteEnum, DNotification>)Delegate.Remove(trayNotificationManager.NotificationDismissed, new Action <NotificationCompleteEnum, DNotification>(onNotificationDismissed)); DNotification dNotification = new DNotification(); dNotification.PopUpDelayTime = 5f; switch (notificationOutcome) { case NotificationCompleteEnum.acceptButton: dNotification.Message = "Accepted"; Service.Get <TrayNotificationManager>().ShowNotification(dNotification); break; case NotificationCompleteEnum.declineButton: dNotification.Message = "Declined"; Service.Get <TrayNotificationManager>().ShowNotification(dNotification); break; } }
public virtual void Show(DNotification data) { if (anim == null) { anim = GetComponent <Animator>(); } anim.SetBool("HideNotification", value: false); messageWithoutButtons.text = data.Message; if (TintableHeader != null) { TintableHeader.color = data.HeaderTint; } if (data.ContainsButtons) { NotificationView.SetActive(value: false); if (NotificationButtonView != null) { NotificationButtonView.SetActive(value: true); } messageWithButtons.text = data.Message; } else { if (NotificationButtonView != null) { NotificationButtonView.SetActive(value: false); } NotificationView.SetActive(value: true); } if (AccessibilitySpeak != null) { AccessibilitySpeak.enabled = true; } Service.Get <EventDispatcher>().AddListener <SceneTransitionEvents.TransitionStart>(onSceneTransition); if (data.AutoClose) { CoroutineRunner.Start(notificationDisplayTime(data.PopUpDelayTime), this, "notificationDisplayTime"); } }
private void notificationComplete(NotificationCompleteEnum notificationOutcome, DNotification notificationData) { currentNotification = null; if (notificationOutcome == NotificationCompleteEnum.leftRoom && persistCurrentNotification) { reshowPreviousNotification = true; return; } if (NotificationDismissed != null) { NotificationDismissed(notificationOutcome, notificationData); } showingNotification = false; checkQueue(); }
public ShowTrayNotificationCommand(DNotification notificationData, RectTransform notificationParentTransform) { this.notificationData = notificationData; this.notificationParentTransform = notificationParentTransform; }
public override void Show(DNotification data) { rawMessage = data.Message; base.Show(data); }