Beispiel #1
0
    public void setCor(Color corUIfundo, Color corLetrasPaineis, Color corUIcampos, Color corLetrasCampos, Color corUIbotoes)
    {
        dinheiro.GetComponent <Image>().color = corUIcampos;
        Text[] textosDinheiro = dinheiro.GetComponentsInChildren <Text>();
        textosDinheiro[0].color = corLetrasCampos;
        textosDinheiro[1].color = corLetrasPaineis;
        rendimento.GetComponent <Image>().color          = corUIcampos;
        rendimento.GetComponentInChildren <Text>().color = corLetrasCampos;
        unidades.GetComponent <Image>().color            = corUIcampos;
        Text[] textosUnidades = unidades.GetComponentsInChildren <Text>();
        textosUnidades[0].GetComponent <Text>().color = corLetrasCampos;
        textosUnidades[1].GetComponent <Text>().color = corLetrasPaineis;
        lucro.GetComponent <Image>().color            = corUIcampos;
        Text[] textosLucro = lucro.GetComponentsInChildren <Text>();
        textosLucro[0].GetComponent <Text>().color = corLetrasCampos;
        textosLucro[1].GetComponent <Text>().color = corLetrasPaineis;
        Image[] imagensSMA = SMA1.GetComponentsInChildren <Image>();
        imagensSMA[0].color = corUIbotoes;
        imagensSMA[1].color = corUIbotoes;
        SMA1.GetComponentInChildren <Text>().color = corLetrasPaineis;

        imagensSMA          = SMA2.GetComponentsInChildren <Image>();
        imagensSMA[0].color = corUIbotoes;
        imagensSMA[1].color = corUIbotoes;
        SMA2.GetComponentInChildren <Text>().color = corLetrasPaineis;

        imagensSMA          = SMA3.GetComponentsInChildren <Image>();
        imagensSMA[0].color = corUIbotoes;
        imagensSMA[1].color = corUIbotoes;
        SMA3.GetComponentInChildren <Text>().color = corLetrasPaineis;

        trendLine.GetComponent <Image>().color = corUIbotoes;
        records.GetComponent <Image>().color   = corUIbotoes;

        _comprar.GetComponent <Image>().color          = corUIbotoes;
        _comprar.GetComponentInChildren <Text>().color = Color.black;

        _vender.GetComponent <Image>().color          = corUIbotoes;
        _vender.GetComponentInChildren <Text>().color = Color.black;

        proximo.GetComponent <Image>().color          = corUIbotoes;
        proximo.GetComponentInChildren <Text>().color = Color.black;

        avancar.GetComponent <Image>().color          = corUIbotoes;
        avancar.GetComponentInChildren <Text>().color = Color.black;

        trocarTema.GetComponent <Image>().color = corUIbotoes;

        porcentagemGanho.GetComponent <Image>().color      = corUIcampos;
        porcentagemRendimento.GetComponent <Image>().color = corUIcampos;

        for (int i = 0; i < paineisFundo.Length; i++)
        {
            paineisFundo[i].color = corUIfundo;
        }

        Camera.main.backgroundColor = corUIfundo;
    }
Beispiel #2
0
    private void setInicialBotoes()
    {
        dinheiro.SetActive(true);
        rendimento.SetActive(false);
        unidades.SetActive(false);
        lucro.SetActive(false);
        botaoZoom.SetActive(true);
        areaLT.SetActive(false);
        telaRecord.SetActive(false);

        SMA1.SetActive(true);
        SMA2.SetActive(true);
        SMA3.SetActive(true);
        t_SMA1 = SMA1.GetComponent <Toggle>();
        t_SMA2 = SMA2.GetComponent <Toggle>();
        t_SMA3 = SMA3.GetComponent <Toggle>();

        trendLine.SetActive(true);
        records.SetActive(true);
        proximo.SetActive(true);
        avancar.SetActive(true);

        _comprar.SetActive(true);
        _vender.SetActive(true);

        loading.SetActive(false);
        aviso.SetActive(false);

        porcentagemGanho.SetActive(false);
        porcentagemRendimento.SetActive(false);

        opcoesValor.SetActive(false);

        trocarTema.SetActive(true);

        ativadoSMA1 = false;
        ativadoSMA2 = false;
        ativadoSMA3 = false;

        avancarNoGrafico = false;
        _vender.GetComponent <Button>().interactable   = true;
        botaoZoom.GetComponent <Button>().interactable = true;
    }
Beispiel #3
0
    private void interagivel(bool recuperarEstado)
    {
        if (recuperarEstado)
        {
            _comprar.GetComponent <Button>().interactable   = estadoAnteriorBotoes[0];
            _vender.GetComponent <Button>().interactable    = estadoAnteriorBotoes[1];
            SMA1.GetComponent <Toggle>().interactable       = estadoAnteriorBotoes[2];
            SMA2.GetComponent <Toggle>().interactable       = estadoAnteriorBotoes[3];
            SMA3.GetComponent <Toggle>().interactable       = estadoAnteriorBotoes[4];
            records.GetComponent <Button>().interactable    = estadoAnteriorBotoes[5];
            trendLine.GetComponent <Button>().interactable  = estadoAnteriorBotoes[6];
            trocarTema.GetComponent <Button>().interactable = estadoAnteriorBotoes[7];
            proximo.GetComponent <Button>().interactable    = estadoAnteriorBotoes[8];
            avancar.GetComponent <Button>().interactable    = estadoAnteriorBotoes[9];
            return;
        }

        estadoAnteriorBotoes = new bool[] {
            _comprar.GetComponent <Button>().interactable,
            _vender.GetComponent <Button>().interactable,
            SMA1.GetComponent <Toggle>().interactable,
            SMA2.GetComponent <Toggle>().interactable,
            SMA3.GetComponent <Toggle>().interactable,
            records.GetComponent <Button>().interactable,
            trendLine.GetComponent <Button>().interactable,
            trocarTema.GetComponent <Button>().interactable,
            proximo.GetComponent <Button>().interactable,
            avancar.GetComponent <Button>().interactable
        };

        _comprar.GetComponent <Button>().interactable   = false;
        _vender.GetComponent <Button>().interactable    = false;
        SMA1.GetComponent <Toggle>().interactable       = false;
        SMA2.GetComponent <Toggle>().interactable       = false;
        SMA3.GetComponent <Toggle>().interactable       = false;
        records.GetComponent <Button>().interactable    = false;
        trendLine.GetComponent <Button>().interactable  = false;
        trocarTema.GetComponent <Button>().interactable = false;
        proximo.GetComponent <Button>().interactable    = false;
        avancar.GetComponent <Button>().interactable    = false;
    }