Esempio n. 1
0
        public override PlayerDialog SetUp(uint player)
        {
            var builder = new DialogBuilder()
                          .AddPage(MainPageId, MainPageInit);

            return(builder.Build());
        }
Esempio n. 2
0
        public override PlayerDialog SetUp(uint player)
        {
            var model = new Model();

            // This menu can be entered one of two ways:
            //    1.) From the player's rest menu.
            //    2.) From using a crafting fabricator.
            // If the second event happens, we need to skip over the first page.
            var state = Craft.GetPlayerCraftingState(player);

            model.SelectedSkill = state.DeviceSkillType;

            if (model.SelectedSkill != SkillType.Invalid)
            {
                model.IsFabricator = true;
            }

            var builder = new DialogBuilder()
                          .WithDataModel(model)
                          .AddBackAction(Back)
                          .AddEndAction(End);

            if (!model.IsFabricator)
            {
                builder.AddPage(MainPageId, MainPageInit);
            }

            builder.AddPage(CategoryPageId, CategoryPageInit)
            .AddPage(RecipeListPageId, RecipeListPageInit)
            .AddPage(RecipePageId, RecipePageInit);

            return(builder.Build());
        }
Esempio n. 3
0
    protected void OnSaveButtonPressed()
    {
        DialogBuilder builder = m_dialogBuilderFactory.Create();

        // if save is successful
        if (m_state.OnSave(m_inputNameField.text))
        {
            builder.SetTitle("Save successful!")
            .SetMessage("Would you like to keep editing this track or start a new one?\n" +
                        "Or you can race it immediately!")
            .SetIcon(DialogBuilder.Icon.STAR)
            .AddButton("Keep Editing", m_state.OnCancel)
            .AddButton("New Track", m_state.OnNewTrack)
            .AddButton("Race!", m_state.OnDone);
        }
        else
        {
            builder.SetTitle("Save unsuccessful!")
            .SetMessage("Please check the storage of your device or contact the developer.")
            .SetIcon(DialogBuilder.Icon.WARNING)
            .AddButton("Back")
            .AddButton("Try Again", () => m_state.OnSave(m_inputNameField.text));
        }

        builder.Build();
    }
        public override PlayerDialog SetUp(uint player)
        {
            var builder = new DialogBuilder()
                          .WithDataModel(new Model())
                          .AddInitializationAction(Initialization)
                          .AddPage(MainPageId, MainPageInit);

            return(builder.Build());
        }
        public override PlayerDialog SetUp(uint player)
        {
            var builder = new DialogBuilder()
                          .WithDataModel(new Model())
                          .AddPage(MainPageId, MainPageInit)
                          .AddPage(AchievementDetailId, AchievementDetailInit);

            return(builder.Build());
        }
Esempio n. 6
0
        public override PlayerDialog SetUp(uint player)
        {
            var builder = new DialogBuilder()
                          .WithDataModel(new Model())
                          .AddPage(MainPageId, MainPageInit)
                          .AddPage(ChangeBattleThemeId, ChangeBattleThemeInit)
                          .AddPage(SongDetailId, SongDetailInit)
                          .AddBackAction(BackAction)
                          .AddEndAction(EndAction);

            return(builder.Build());
        }
        public override PlayerDialog SetUp(uint player)
        {
            var builder = new DialogBuilder()
                          .WithDataModel(new Model())
                          .AddInitializationAction(Initialize)
                          .AddEndAction(ClearPlacementGrid)
                          .AddPage(MainPageId, MainPageInit)
                          .AddPage(MovePageId, MovePageInit)
                          .AddPage(RotatePageId, RotatePageInit);

            return(builder.Build());
        }
Esempio n. 8
0
    public void CreateDialog()
    {
        DialogBuilder builder = m_builderFactory.Create();

        builder.SetTitle(Title)
        .SetMessage(Message)
        .SetIcon(Icon);

        for (int i = 0; i < Buttons.Length; ++i)
        {
            builder.AddButton(Buttons [i].ButtonText, DummyCallback);
        }

        builder.Build();
    }
Esempio n. 9
0
        public override PlayerDialog SetUp(uint player)
        {
            var builder = new DialogBuilder()
                          .WithDataModel(new Model())
                          .AddPage(MainPageId, MainPageInit)
                          .AddPage(PurchaseHouseLayoutDetailPageId, PurchaseHouseLayoutDetailPageInit)
                          .AddPage(SellHousePageId, SellHousePageInit)
                          .AddBackAction((previous, next) =>
            {
                var model = GetDataModel <Model>();
                model.IsConfirmingPurchase = false;
                model.IsConfirmingSell     = false;
            });

            return(builder.Build());
        }
Esempio n. 10
0
        public override PlayerDialog SetUp(uint player)
        {
            var builder = new DialogBuilder()
                          .WithDataModel(new Model())
                          .AddBackAction((oldPage, newPage) =>
            {
                var model = GetDataModel <Model>();
                model.IsConfirmingPurchase = false;
            })
                          .AddPage(MainPageId, MainPageInit)
                          .AddPage(CategoryPageId, CategoryPageInit)
                          .AddPage(PerkListPageId, PerkListPageInit)
                          .AddPage(PerkDetailsPageId, PerkDetailsPageInit)
                          .AddPage(ViewMyPerksPageId, ViewMyPerksPageInit);

            return(builder.Build());
        }
Esempio n. 11
0
        public override PlayerDialog SetUp(uint player)
        {
            var builder = new DialogBuilder()
                          .WithDataModel(new Model())
                          .AddPage(MainPageId, MainInit)
                          .AddPage(ViewShopsPageId, ViewShopsInit)
                          .AddPage(EditMyShopPageId, EditMyShopInit)
                          .AddPage(ChangeStoreNamePageId, ChangeStoreNameInit)
                          .AddPage(EditItemListPageId, EditItemListInit)
                          .AddPage(ExtendLeasePageId, ExtendLeaseInit)
                          .AddPage(ListingPageId, ListingInit)
                          .AddBackAction((oldPage, newPage) =>
            {
                ClearTemporaryVariables();
            })
                          .AddEndAction(ClearTemporaryVariables);

            return(builder.Build());
        }
        /// <summary>
        /// Sets up all pages.
        /// </summary>
        /// <param name="player">The player this dialog is being set up for.</param>
        /// <returns>The constructed player dialog</returns>
        public override PlayerDialog SetUp(uint player)
        {
            var builder = new DialogBuilder()
                          .WithDataModel(new Model())
                          .AddBackAction(Back)
                          .AddEndAction(ClearTemporaryVariables)
                          .AddPage(MainPageId, MainPageInit)
                          .AddPage(ViewCardLevelsPageId, ViewCardLevelsPageInit)
                          .AddPage(ViewCardsPageId, ViewCardsPageInit)
                          .AddPage(ViewCardDetailsPageId, ViewCardDetailsPageInit)
                          .AddPage(DeckListPageId, DeckListPageInit)
                          .AddPage(DeckDetailsPageId, DeckDetailsPageInit)
                          .AddPage(ChangeDeckNamePageId, ChangeDeckNamePageInit)
                          .AddPage(DeckCardSelectionLevelsPageId, DeckCardSelectionLevelsPageInit)
                          .AddPage(DeckCardSelectionListPageId, DeckCardSelectionListPageInit)
                          .AddPage(DeckCardSelectionConfirmDeckPageId, DeckCardSelectionConfirmDeckPageInit);

            return(builder.Build());
        }
Esempio n. 13
0
        public override PlayerDialog SetUp(uint player)
        {
            var builder = new DialogBuilder()
                          .WithDataModel(new Model())
                          .AddInitializationAction(() =>
            {
                var model      = GetDataModel <Model>();
                model.TomeItem = GetLocalObject(player, "PERK_REFUND_OBJECT");
                DeleteLocalObject(player, "PERK_REFUND_OBJECT");
            })
                          .AddPage(MainPageId, MainPageInit)
                          .AddPage(ConfirmRefundId, ConfirmRefundInit)
                          .AddBackAction((oldPage, newPage) =>
            {
                var model          = GetDataModel <Model>();
                model.IsConfirming = false;
            });

            return(builder.Build());
        }
Esempio n. 14
0
        public override PlayerDialog SetUp(uint player)
        {
            var builder = new DialogBuilder()
                          .AddPage(MainPageId, (page) =>
            {
                page.Header = "Please select a song.";

                foreach (var song in Music.GetAllSongs())
                {
                    page.AddResponse(song.DisplayName, () =>
                    {
                        var area = GetArea(player);
                        FloatingTextStringOnCreature($"Song Selected: {song.DisplayName}", player, false);

                        MusicBackgroundChangeDay(area, song.ID);
                        MusicBackgroundChangeNight(area, song.ID);
                        MusicBackgroundPlay(area);
                    });
                }
            });

            return(builder.Build());
        }