Beispiel #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;
 }
Beispiel #2
0
        public void ShowConfirmPublishPrompt()
        {
            PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("IglooConfirmMakeActivePrompt");
            PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, onIglooConfirmMakeActivePromptLoaded);

            promptLoaderCMD.Execute();
        }
        private void showIglooConfirmDeletePrompt()
        {
            PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("IglooConfirmDeletePrompt");
            PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, onIglooConfirmDeletePromptLoaded);

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

        promptLoaderCMD.Execute();
    }
Beispiel #5
0
    private void showMembershipExpiringPrompt()
    {
        PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("MembershipExpiringPrompt");
        PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, onMembershipExpiringPromptLoaded);

        promptLoaderCMD.Execute();
    }
        private bool onRemovingStructureWithItems(ObjectManipulationEvents.RemovingStructureWithItemsEvent evt)
        {
            PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("IglooConfirmStructureRemovalPrompt");
            PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, onIglooConfirmStructureRemovalPromptLoaded);

            promptLoaderCMD.Execute();
            return(false);
        }
        private bool onClearCurrentLayout(IglooUIEvents.ClearCurrentLayout evt)
        {
            PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("IglooConfirmClearLayoutPrompt");
            PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, onConfirmClearLayoutPromptLoaded);

            promptLoaderCMD.Execute();
            return(false);
        }
Beispiel #8
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;
 }
Beispiel #9
0
        protected void showAccountBannedPrompt(AlertType category = AlertType.Unknown, DateTime?expirationDate = null)
        {
            PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("ModerationCriticalPrompt");
            PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, delegate(PromptLoaderCMD loader)
            {
                onAccountBannedPromptLoaded(loader, category, expirationDate);
            });

            promptLoaderCMD.Execute();
        }
Beispiel #10
0
        private bool onAccountBannedEvent(SessionErrorEvents.AccountBannedEvent evt)
        {
            Service.Get <ICPSwrveService>().Error("error_prompt", "AccountBannedEvent", SceneManager.GetActiveScene().name);
            PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("ModerationCriticalPrompt");
            PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, delegate(PromptLoaderCMD loader)
            {
                showAccountBannedPrompt(loader, evt);
            });

            promptLoaderCMD.Execute();
            return(true);
        }
Beispiel #11
0
        private void onMaxLayoutItemsReached()
        {
            PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("IglooItemLimitReachedPrompt");
            PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, onIglooItemLimitReachedPromptLoaded);

            promptLoaderCMD.Execute();
            if (ClubPenguin.Core.SceneRefs.IsSet <ObjectManipulationInputController>())
            {
                ClubPenguin.Core.SceneRefs.Get <ObjectManipulationInputController>().Reset();
            }
            Service.Get <EventDispatcher>().DispatchEvent(default(ObjectManipulationEvents.EndDragInventoryItem));
        }
    private void removeItem(EditableItem editableItem)
    {
        EquipmentIcon iconItem = editableItem.GetComponentInChildren <EquipmentIcon>();

        indexToRemove = editableItem.GetCurrentIndex();
        PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("DeleteEquipmentPrompt");
        PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, delegate(PromptLoaderCMD loader)
        {
            showRemoveItemPrompt(loader, iconItem);
        });

        promptLoaderCMD.Execute();
    }
Beispiel #13
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();
     }
 }
Beispiel #14
0
 private void onSceneLayoutData(SceneLayoutData sceneLayoutData)
 {
     if (stateController.DataManager.IsActiveIgloo(sceneLayoutData.LayoutId))
     {
         publishedLayout = stateController.DataManager.GetPublishedActiveLayout();
     }
     if (publishedLayout != null && !sceneLayoutData.IsSameLayout(publishedLayout))
     {
         PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("IglooConfirmUnfinishedBusinessPrompt");
         PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, onIglooConfirmUnfinishedBusinessPromptLoaded);
         promptLoaderCMD.Execute();
     }
     else
     {
         stateController.DataManager.StartSync();
     }
 }
Beispiel #15
0
    public void onIglooNotAvailable()
    {
        IsConnecting = false;
        Service.Get <ICPSwrveService>().Error("network_error", "CPRoomPrivateError", Service.Get <GameStateController>().CurrentState(), SceneManager.GetActiveScene().name);
        isCancelledSceneTransitionRequested = false;
        HardCancelTransition();
        if (!IsTransitioning)
        {
            returnToPreviousScene();
        }
        else
        {
            isCancelledSceneTransitionRequested = true;
        }
        PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("IglooPrivatePrompt");
        PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, onIglooRoomFullPromptLoaded);

        promptLoaderCMD.ExecuteImmediate();
    }
 public void OnClick()
 {
     if (!isCurrentServer)
     {
         if (isWorldFull)
         {
             PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("WorldFullPrompt");
             PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, showWorldFullPrompt);
             promptLoaderCMD.Execute();
         }
         else if (World.Language != Service.Get <Localizer>().Language)
         {
             PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("ChangeServerPrompt");
             PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, showChangeServerPrompt);
             promptLoaderCMD.Execute();
         }
         else
         {
             changeServer();
         }
     }
 }
    public void ShowPrompt(PromptDefinition promptDefinition, Action <DPrompt.ButtonFlags> callback)
    {
        PromptLoaderCMD promptLoaderCMD = new PromptLoaderCMD(this, promptDefinition, showPrompt, callback);

        promptLoaderCMD.Execute();
    }