FairyGUI.FieldTypes.ParseFillMethod C# (CSharp) Method

ParseFillMethod() public static method

public static ParseFillMethod ( string value ) : FillMethod
value string
return FillMethod
        public static FillMethod ParseFillMethod(string value)
        {
            switch (value)
            {
                case "none":
                    return FillMethod.None;
                case "hz":
                    return FillMethod.Horizontal;
                case "vt":
                    return FillMethod.Vertical;
                case "radial90":
                    return FillMethod.Radial90;
                case "radial180":
                    return FillMethod.Radial180;
                case "radial360":
                    return FillMethod.Radial360;
                default:
                    return FillMethod.None;
            }
        }

Usage Example

Example #1
0
        override public void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;

            str = xml.GetAttribute("color");
            if (str != null)
            {
                _content.color = ToolSet.ConvertFromHtmlColor(str);
            }

            str = xml.GetAttribute("flip");
            if (str != null)
            {
                _content.flip = FieldTypes.ParseFlipType(str);
            }

            str = xml.GetAttribute("fillMethod");
            if (str != null)
            {
                _content.fillMethod = FieldTypes.ParseFillMethod(str);
            }

            if (_content.fillMethod != FillMethod.None)
            {
                _content.fillOrigin    = xml.GetAttributeInt("fillOrigin");
                _content.fillClockwise = xml.GetAttributeBool("fillClockwise", true);
                _content.fillAmount    = (float)xml.GetAttributeInt("fillAmount", 100) / 100;
            }
        }
All Usage Examples Of FairyGUI.FieldTypes::ParseFillMethod