public PromptLoaderCMD(object owner, PromptDefinition promptDefinition, Action <PromptLoaderCMD> onCompleteHandler, Action <DPrompt.ButtonFlags> promptCallback = null) { this.owner = owner; PromptDefinition = promptDefinition; PromptCallback = promptCallback; this.onCompleteHandler = onCompleteHandler; }
private void showMembershipExpiringPrompt() { PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("MembershipExpiringPrompt"); PromptLoaderCMD promptLoaderCMD = new PromptLoaderCMD(this, promptDefinition, onMembershipExpiringPromptLoaded); promptLoaderCMD.Execute(); }
public void OnUnfriendPlayerButtonClicked() { PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("UnfriendPrompt"); PromptLoaderCMD promptLoaderCMD = new PromptLoaderCMD(this, promptDefinition, showUnfriendPrompt); promptLoaderCMD.Execute(); }
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; }
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(); } }
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(); } }
public void ShowPrompt(PromptDefinition promptDefinition, Action <DPrompt.ButtonFlags> callback) { PromptLoaderCMD promptLoaderCMD = new PromptLoaderCMD(this, promptDefinition, showPrompt, callback); promptLoaderCMD.Execute(); }