Example #1
0
 public PromptLoaderCMD(object owner, PromptDefinition promptDefinition, Action <PromptLoaderCMD> onCompleteHandler, Action <DPrompt.ButtonFlags> promptCallback = null)
 {
     this.owner             = owner;
     PromptDefinition       = promptDefinition;
     PromptCallback         = promptCallback;
     this.onCompleteHandler = onCompleteHandler;
 }
Example #2
0
        private void showMembershipExpiringPrompt()
        {
            PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("MembershipExpiringPrompt");
            PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, onMembershipExpiringPromptLoaded);

            promptLoaderCMD.Execute();
        }
Example #3
0
        public void OnUnfriendPlayerButtonClicked()
        {
            PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("UnfriendPrompt");
            PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, showUnfriendPrompt);

            promptLoaderCMD.Execute();
        }
Example #4
0
 public PromptLoaderCMD(object owner, PromptDefinition promptDefinition, string titleTextInsert, string bodyTextInsert, Action <PromptLoaderCMD> onCompleteHandler, Action <DPrompt.ButtonFlags> promptCallback = null)
 {
     this.owner             = owner;
     PromptDefinition       = promptDefinition;
     PromptCallback         = promptCallback;
     this.onCompleteHandler = onCompleteHandler;
     this.titleTextInsert   = titleTextInsert;
     this.bodyTextInsert    = bodyTextInsert;
 }
Example #5
0
 private void checkAndDisplayMessage()
 {
     if (!isShowingMessage && queuedAlerts.Count > 0)
     {
         isShowingMessage = true;
         IModerationAlert alert            = queuedAlerts.Peek();
         PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition(alert.IsCritical ? "ModerationCriticalPrompt" : "ModerationWarningPrompt");
         PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, delegate(PromptLoaderCMD loader)
         {
             showModerationPrompt(loader, alert);
         });
         promptLoaderCMD.Execute();
     }
 }
Example #6
0
 public void OnJumpToFriendButtonClicked()
 {
     if (!playerCardController.IsShowingJumpPrompt)
     {
         playerCardController.IsShowingJumpPrompt = true;
         CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();
         PresenceData           component = cPDataEntityCollection.GetComponent <PresenceData>(cPDataEntityCollection.LocalPlayerHandle);
         if (component.World == playerWorld)
         {
             Service.Get <PromptManager>().ShowPrompt("JumpToFriendPrompt", onJumpToFriendPromptButtonClicked);
             return;
         }
         PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("JumpToFriendServerPrompt");
         PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, showJumpToFriendServerPrompt);
         promptLoaderCMD.Execute();
     }
 }
Example #7
0
        public void ShowPrompt(PromptDefinition promptDefinition, Action <DPrompt.ButtonFlags> callback)
        {
            PromptLoaderCMD promptLoaderCMD = new PromptLoaderCMD(this, promptDefinition, showPrompt, callback);

            promptLoaderCMD.Execute();
        }