예제 #1
0
    private void OpcoesDoGlobalizationMenu(int x)
    {
        switch (x)
        {
        case 0:
            estado = EstadoDoMenu.main;
            secManager.ChangeColorReg(RegistroDeCores.registravel);
            break;

        case 1:
            estado = EstadoDoMenu.main;
            secManager.ChangeColorReg(transitoryReg);
            break;

        case 2:
            globalCM.StartHud(globalCM.RememberedColor, secManager.GuardOriginalColor.cor, secManager.VerifyColorReg(), secManager.GetTargetColorReg);
            StartGlobalColorMenu();
            break;
        }

        globalMenu.FinishHud();
    }
예제 #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);
    }