예제 #1
0
    private bool GlobalizationMenuState()
    {
        int val = -CommandReader.GetIntTriggerDown("vertical", Controlador.teclado);

        globalMenu.ChangeOption(val);

        if (Input.GetKeyDown(KeyCode.Return))
        {
            OpcoesDoGlobalizationMenu(globalMenu.SelectedOption);
        }

        return(false);
    }
예제 #2
0
    private bool CharacterSaveChangesState()
    {
        int change = -CommandReader.GetIntTriggerDown("vertical", Controlador.teclado);

        if (change != 0)
        {
            charDbMenu.ChangeOption(change);
            List <CustomizationContainerDates> lccd = ToSaveCustomizationContainer.Instance.ccds;
            ChangeBaseCharacter(lccd[charDbMenu.SelectedOption].PersBase == PersonagemBase.masculino);

            SupportSingleton.Instance.InvokeOnEndFrame(() =>
            {
                secManager.SetCustomDates(lccd[charDbMenu.SelectedOption]);
            });
        }
        else if (Input.GetKeyDown(KeyCode.Return))
        {
            cMenu.StartHud(secManager, MainAction, ChangeAction, EscapeAction, activeEditables);
            charDbMenu.FinishHud();
            estado = EstadoDoMenu.main;
        }
        else if (Input.GetKeyDown(KeyCode.Escape))
        {
            estado = EstadoDoMenu.confirmacaoAberta;
            confirmation.StartConfirmationPanel(
                () =>
            {
                ToSaveCustomizationContainer.Instance.ccds.RemoveAt(charDbMenu.SelectedOption);
                ToSaveCustomizationContainer.Instance.SaveLoaded();

                charDbMenu.FinishHud();

                StartCharactersSavedMenu();

                estado = EstadoDoMenu.characterSaveChanges;
            },
                () => { estado = EstadoDoMenu.characterSaveChanges; },
                "Gostaria de deletar esse personagem do vetor?",
                hideSelections: true);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            //charDbMenu.FinishHud();
            estado = EstadoDoMenu.inputTextOpened;

            inputTextManager.StartHud(() => {
                CustomizationContainerDates ccd = ToSaveCustomizationContainer.Instance.ccds[charDbMenu.SelectedOption];

                ccd.Sid = inputTextManager.TextContent;
                ToSaveCustomizationContainer.Instance.SaveLoaded();
                int guard = charDbMenu.SelectedOption;
                charDbMenu.FinishHud();
                StartCharactersSavedMenu(guard);
                inputTextManager.FinishHud();

                estado = EstadoDoMenu.characterSaveChanges;
            }, () => {
                //inputTextManager.FinishHud();
                //charDbMenu.FinishHud();
                //StartCharactersSavedMenu();
                estado = EstadoDoMenu.characterSaveChanges;
            },
                                      "Escolha um nome, que será identificador  ID, para esse personagem");
        }
        return(true);
    }