示例#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
    bool ColorState()
    {
        bool foi       = false;
        bool effective = false;

        int x = CommandReader.GetIntTriggerDown("horizontal", Controlador.teclado);
        int y = CommandReader.GetIntTriggerDown("vertical", Controlador.teclado);

        mySuggestionColors.ChangeOption(y, x);

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            effective = false;
            foi       = true;
        }
        else if (Input.GetKeyDown(KeyCode.Return))
        {
            effective = true;
            foi       = true;
        }
        else if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            Color C = mySuggestionColors.GetSelectedColor;

            FinishColorGrid();

            ChangeToColorCircle(C);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha2) && secManager.GetTargetColorReg != RegistroDeCores.skin)
        {
            globalCM.StartHud(mySuggestionColors.GetSelectedColor, secManager.GuardOriginalColor.cor, secManager.VerifyColorReg(), secManager.GetTargetColorReg);
            StartGlobalColorMenu();
            FinishColorGrid();
        }

        if (foi)
        {
            secManager.EndChangeColor(effective);

            FinishColorGrid();

            estado = EstadoDoMenu.main;
        }
        return(true);
    }
示例#3
0
    private bool GlobalizationColorsState()
    {
        globalCM.ChangeOption(
            CommandReader.GetIntTriggerDown("horizontal", Controlador.teclado),
            -CommandReader.GetIntTriggerDown("vertical", Controlador.teclado)
            );

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            secManager.EndChangeColor(false);
            estado = EstadoDoMenu.main;
            EndGlobalColorMenu();
        }
        else if (Input.GetKeyDown(KeyCode.Return))
        {
            globalCM.InvokeSelectedAction();
        }
        else if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            EndGlobalColorMenu();
            ChangeToColorGrid();
        }
        else if (Input.GetKeyDown(KeyCode.Alpha2))
        {
            ChangeToColorCircle(globalCM.RememberedColor);
            EndGlobalColorMenu();
        }
        else if (Input.GetKeyDown(KeyCode.Space))
        {
            EndGlobalColorMenu();
            estado = EstadoDoMenu.main;
        }


        return(true);
    }
示例#4
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);
    }