Esempio n. 1
0
 private void updateUI(Team team)
 {
     teamName.text = team.GetTeamName();
     //Debug.Log("Selected Team Name: " + team.GetTeamName());
     //selectedColor.currentColor = team.GetTeamColor ();
     selectedColor.AssignColor(team.GetTeamColor());
     //Debug.Log("Selected color updated");
     RefreshTeams(teamDropdown);
 }
Esempio n. 2
0
    public void ManipulateViaHex2RGB()
    {
        string hex = textColor.text;

        Vector3 rgb   = Hex2RGB(hex);
        Color   color = NormalizeVector4(rgb, 255f, 1f); print(rgb);

        hsvpicker.AssignColor(color);
    }
Esempio n. 3
0
    public void ColourSelected(int index)
    {
        GameObject[] highlights = new GameObject[] { m_fromHighlight, m_toHighlight, m_thenHighlight };

        m_colourSelected = !highlights[index].activeSelf;

        for (int idx = 0; idx < 3; idx++)
        {
            if (idx == index)
            {
                highlights[idx].SetActive(m_colourSelected);
            }
            else
            {
                highlights[idx].SetActive(false);
            }
        }

        if (m_colourSelected)
        {
            m_sectionLayoutElement.minHeight = 130;

            Color cachedTargetColour = m_colours[index].color;

            m_colourPickerSection.SetActive(true);

            m_colourPicker.AssignColor(cachedTargetColour);

            m_currentColourIndex = index;
        }
        else
        {
            m_sectionLayoutElement.minHeight = 30;

            m_colourPickerSection.SetActive(false);
        }
    }