void OpenSelectSeedMenu(PlayerIndex pi)
        {
            GameScreen screen;

            if (fillingMethod == FillingMethod.Archipelago)
            {
                screen = ArchipelagoSelectionScreen.Create(ScreenManager);
            }
            else
            {
                screen = SeedSelectionMenuScreen.Create(ScreenManager);
            }

            ScreenManager.AddScreen(screen, pi);
        }
Exemplo n.º 2
0
        void UpdateInput(InputState input)
        {
            if (!GameScreen.IsActive)
            {
                return;
            }

            if (input.IsButtonHold(Buttons.LeftTrigger))
            {
                UpdateDescription(true);

                DisplaySeedId();

                DisplayArchipelagoInfo();

                if (input.IsNewButtonPress(Buttons.X))
                {
                    Dynamic._isDeleting = false;

                    ShowDeleteAllDialog();
                }
            }
            else
            {
                UpdateDescription(false);
            }

            if (input.IsNewButtonPress(Buttons.RightTrigger))
            {
                var selectedSaveFile = CurrentSelectedSave;
                if (selectedSaveFile == null)
                {
                    return;
                }

                ShowSpoilerGenerationDialog(selectedSaveFile);
            }

            if (input.IsControllHold() && input.IsKeyHold(Keys.C))
            {
                var seed = CurrentSelectedSave?.GetSeed();

                if (!seed.HasValue)
                {
                    return;
                }

                SDL.SDL_SetClipboardText(seed.Value.ToString());
            }

            if (input.IsNewPressTertiary(null))
            {
                var selectedSaveFile = CurrentSelectedSave;
                if (selectedSaveFile == null)
                {
                    return;
                }

                //if save is cleared, cancel newgame+ menu
                if (selectedSaveFile.IsGameCleared)
                {
                    ScreenManager.RemoveScreen(ScreenManager.FirstOrDefaultTimespinnerOfType(MessageBoxScreenType));
                }

                var seed = selectedSaveFile.GetSeed();
                if (seed.HasValue && seed.Value.Options.Archipelago)
                {
                    ScreenManager.AddScreen(ArchipelagoSelectionScreen.Create(ScreenManager), null);
                }
            }
        }