Ejemplo n.º 1
0
    // 0 = white, 1 = magenta, 2 = cyan, 3 = lime
    public void SetColor(string colourName)
    {
        m_CurrentColor = (BrandColors)Enum.Parse(typeof(BrandColors), colourName);

        if (m_CurrentObject != null)
        {
            m_CurrentObject.objectMat.color = GetColor(m_CurrentColor);
        }
    }
Ejemplo n.º 2
0
    private Color GetColor(BrandColors mCurrentColor)
    {
        switch (mCurrentColor)
        {
        case BrandColors.White:
            return(k_White);

        case BrandColors.Magenta:
            return(k_Magenta);

        case BrandColors.Cyan:
            return(k_Cyan);

        case BrandColors.Lime:
            return(k_Lime);

        default:
            throw new ArgumentOutOfRangeException(nameof(mCurrentColor), mCurrentColor, null);
        }
    }
Ejemplo n.º 3
0
        /// <summary>
        /// Sets the Button's Color
        /// </summary>
        /// <param name="color">The color.</param>
        /// <returns></returns>
        public TBuilder Color(BrandColors color)
        {
            BrandColor = color;

            return((TBuilder)this);
        }