FairyGUI.Utils.XML.GetAttributeColor C# (CSharp) Method

GetAttributeColor() public method

public GetAttributeColor ( string attrName, Color defValue ) : Color
attrName string
defValue Color
return Color
        public Color GetAttributeColor(string attrName, Color defValue)
        {
            string value = GetAttribute(attrName);
            if (value == null || value.Length == 0)
                return defValue;

            return ToolSet.ConvertFromHtmlColor(value);
        }

Usage Example

 static public int GetAttributeColor(IntPtr l)
 {
     try {
         FairyGUI.Utils.XML self = (FairyGUI.Utils.XML)checkSelf(l);
         System.String      a1;
         checkType(l, 2, out a1);
         UnityEngine.Color a2;
         checkType(l, 3, out a2);
         var ret = self.GetAttributeColor(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }