• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Utils.XML类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FairyGUI.Utils.XML的典型用法代码示例。如果您正苦于以下问题:C# XML类的具体用法?C# XML怎么用?C# XML使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XML类属于FairyGUI.Utils命名空间,在下文中一共展示了XML类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ConstructFromXML

        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            _grip = GetChild("grip");
            if (_grip == null)
            {
                Debug.LogWarning("FairyGUI: " + this.resourceURL + " should define grip");
                return;
            }

            _bar = GetChild("bar");
            if (_bar == null)
            {
                Debug.LogWarning("FairyGUI: " + this.resourceURL + " should define bar");
                return;
            }

            _arrowButton1 = GetChild("arrow1");
            _arrowButton2 = GetChild("arrow2");

            _grip.onMouseDown.Add(__gripMouseDown);
            if (_arrowButton1 != null)
                _arrowButton1.onClick.Add(__arrowButton1Click);
            if (_arrowButton2 != null)
                _arrowButton2.onClick.Add(__arrowButton2Click);
        }
开发者ID:niuniuzhu,项目名称:FairyGUI-unity,代码行数:27,代码来源:GScrollBar.cs


示例2: Setup_AfterAdd

        public override void Setup_AfterAdd(XML xml)
        {
            base.Setup_AfterAdd(xml);

            XML cxml = xml.GetNode("gearColor");
            if (cxml != null)
                gearColor.Setup(cxml);
        }
开发者ID:niuniuzhu,项目名称:FairyGUI-unity,代码行数:8,代码来源:GImage.cs


示例3: Setup_BeforeAdd

        public override void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;
            str = xml.GetAttribute("color");
            if (str != null)
                this.color = ToolSet.ConvertFromHtmlColor(str);

            str = xml.GetAttribute("flip");
            if (str != null)
                _content.flip = FieldTypes.ParseFlipType(str);
        }
开发者ID:niuniuzhu,项目名称:FairyGUI-unity,代码行数:13,代码来源:GImage.cs


示例4: Setup

        public void Setup(XML xml)
        {
            string str;

            _controller = _owner.parent.GetController(xml.GetAttribute("controller"));
            if (_controller == null)
                return;

            Init();

            str = xml.GetAttribute("tween");
            if (str != null)
                tween = true;

            str = xml.GetAttribute("ease");
            if (str != null)
                easeType = FieldTypes.ParseEaseType(str);

            str = xml.GetAttribute("duration");
            if (str != null)
                tweenTime = float.Parse(str);

            str = xml.GetAttribute("delay");
            if (str != null)
                delay = float.Parse(str);

            if (this is GearDisplay)
            {
                string[] pages = xml.GetAttributeArray("pages");
                if (pages != null)
                    ((GearDisplay)this).pages = pages;
            }
            else
            {
                string[] pages = xml.GetAttributeArray("pages");
                string[] values = xml.GetAttributeArray("values", '|');

                if (pages != null && values != null)
                {
                    for (int i = 0; i < values.Length; i++)
                        AddStatus(pages[i], values[i]);
                }
                str = xml.GetAttribute("default");
                if (str != null)
                    AddStatus(null, str);
            }
        }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:47,代码来源:GearBase.cs


示例5: Setup

        public void Setup(XML xml)
        {
            string str;

            _controller = _owner.parent.GetController(xml.GetAttribute("controller"));
            if (_controller == null)
                return;

            Init();

            string[] pages = xml.GetAttributeArray("pages");
            if (pages != null)
            {
                foreach (string s in pages)
                    pageSet.AddById(s);
            }

            str = xml.GetAttribute("tween");
            if (str != null)
                tween = true;

            str = xml.GetAttribute("ease");
            if (str != null)
                easeType = FieldTypes.ParseEaseType(str);

            str = xml.GetAttribute("duration");
            if (str != null)
                tweenTime = float.Parse(str);

            str = xml.GetAttribute("values");
            string[] values = null;
            if (str != null)
                values = str.Split(jointChar1);

            if (values != null)
            {
                for (int i = 0; i < values.Length; i++)
                {
                    str = values[i];
                    if (str != "-")
                        AddStatus(pages[i], str);
                }
            }
            str = xml.GetAttribute("default");
            if (str != null)
                AddStatus(null, str);
        }
开发者ID:hxyxj,项目名称:FairyGUI-unity,代码行数:47,代码来源:GearBase.cs


示例6: GetItemAsset


//.........这里部分代码省略.........

                        Texture2D tex;
                        if (_resBundle != null)
                        {
            #if UNITY_5
                            tex = _resBundle.LoadAsset<Texture2D>(filePath);
            #else
                            tex = (Texture2D)_resBundle.Load(filePath, typeof(Texture2D));
            #endif
                        }
                        else
                            tex = (Texture2D)_loadFunc(filePath, ext, typeof(Texture2D));
                        if (tex == null)
                        {
                            Debug.LogWarning("FairyGUI: texture '" + fileName + "' not found in " + this.name);
                            item.texture = NTexture.Empty;
                        }
                        else
                        {
                            if (tex.mipmapCount > 1)
                                Debug.LogWarning("FairyGUI: texture '" + fileName + "' in " + this.name + " is mipmaps enabled.");
                            item.texture = new NTexture(tex, (float)tex.width / item.width, (float)tex.height / item.height);

                            filePath = filePath + "!a";
                            if (_resBundle != null)
                            {
            #if UNITY_5
                                tex = _resBundle.LoadAsset<Texture2D>(filePath);
            #else
                                tex = (Texture2D)_resBundle.Load(filePath, typeof(Texture2D));
            #endif
                            }
                            else
                                tex = (Texture2D)_loadFunc(filePath, ext, typeof(Texture2D));
                            if (tex != null)
                                item.texture.alphaTexture = tex;
                        }
                    }
                    return item.texture;

                case PackageItemType.Sound:
                    if (!item.decoded)
                    {
                        item.decoded = true;
                        string fileName = _assetNamePrefix + Path.GetFileNameWithoutExtension(item.file);
                        string ext = Path.GetExtension(item.file);
                        if (_resBundle != null)
                        {
            #if UNITY_5
                            item.audioClip = _resBundle.LoadAsset<AudioClip>(fileName);
            #else
                            item.audioClip = (AudioClip)_resBundle.Load(fileName, typeof(AudioClip));
            #endif
                        }
                        else
                            item.audioClip = (AudioClip)_loadFunc(fileName, ext, typeof(AudioClip));
                    }
                    return item.audioClip;

                case PackageItemType.Font:
                    if (!item.decoded)
                    {
                        item.decoded = true;
                        LoadFont(item);
                    }
                    return item.bitmapFont;

                case PackageItemType.MovieClip:
                    if (!item.decoded)
                    {
                        item.decoded = true;
                        LoadMovieClip(item);
                    }
                    return item.frames;

                case PackageItemType.Component:
                    if (!item.decoded)
                    {
                        item.decoded = true;
                        string str = _descPack[item.id + ".xml"];
                        XML xml = new XML(str);
                        if (_stringsSource != null)
                        {
                            Dictionary<string, string> strings;
                            if (_stringsSource.TryGetValue(this.id + item.id, out strings))
                                TranslateComponent(xml, strings);
                        }
                        item.componentData = xml;
                    }
                    return item.componentData;

                default:
                    if (!item.decoded)
                    {
                        item.decoded = true;
                        item.binary = LoadBinary(item.file);
                    }
                    return item.binary;
            }
        }
开发者ID:yinlei,项目名称:Fishing,代码行数:101,代码来源:UIPackage.cs


示例7: TranslateComponent

        void TranslateComponent(XML xml, Dictionary<string, string> strings)
        {
            XML listNode = xml.GetNode("displayList");
            if (listNode == null)
                return;

            XMLList col = listNode.Elements();

            string ename, elementId, value;
            foreach (XML cxml in col)
            {
                ename = cxml.name;
                elementId = cxml.GetAttribute("id");
                if (cxml.HasAttribute("tooltips"))
                {
                    if (strings.TryGetValue(elementId + "-tips", out value))
                        cxml.SetAttribute("tooltips", value);
                }

                if (ename == "text" || ename == "richtext")
                {
                    if (strings.TryGetValue(elementId, out value))
                        cxml.SetAttribute("text", value);
                }
                else if (ename == "list")
                {
                    XMLList items = cxml.Elements("item");
                    int j = 0;
                    foreach (XML exml in items)
                    {
                        if (strings.TryGetValue(elementId + "-" + j, out value))
                            exml.SetAttribute("title", value);
                        j++;
                    }
                }
                else if (ename == "component")
                {
                    XML dxml = cxml.GetNode("Button");
                    if (dxml != null)
                    {
                        if (strings.TryGetValue(elementId, out value))
                            dxml.SetAttribute("title", value);
                        if (strings.TryGetValue(elementId + "-0", out value))
                            dxml.SetAttribute("selectedTitle", value);
                    }
                    else
                    {
                        dxml = cxml.GetNode("Label");
                        if (dxml != null)
                        {
                            if (strings.TryGetValue(elementId, out value))
                                dxml.SetAttribute("title", value);
                        }
                        else
                        {
                            dxml = cxml.GetNode("ComboBox");
                            if (dxml != null)
                            {
                                if (strings.TryGetValue(elementId, out value))
                                    dxml.SetAttribute("title", value);

                                XMLList items = dxml.Elements("item");
                                int j = 0;
                                foreach (XML exml in items)
                                {
                                    if (strings.TryGetValue(elementId + "-" + j, out value))
                                        exml.SetAttribute("title", value);
                                    j++;
                                }
                            }
                        }
                    }
                }
            }
        }
开发者ID:yinlei,项目名称:Fishing,代码行数:75,代码来源:UIPackage.cs


示例8: Add

 public void Add(XML xml)
 {
     rawList.Add(xml);
 }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:4,代码来源:XMLList.cs


示例9: Enumerator

 public Enumerator(List<XML> source, string selector)
 {
     _source = source;
     _selector = selector;
     _index = -1;
     if (_source != null)
         _total = _source.Count;
     else
         _total = 0;
     _current = null;
 }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:11,代码来源:XMLList.cs


示例10: Setup_AfterAdd

        public virtual void Setup_AfterAdd(XML xml)
        {
            string str;

            str = xml.GetAttribute("group");
            if (str != null)
                group = parent.GetChildById(str) as GGroup;

            XMLList.Enumerator et = xml.GetEnumerator();
            XML cxml;
            int index;
            while (et.MoveNext())
            {
                cxml = et.Current;
                if (GearXMLKeys.TryGetValue(cxml.name, out index))
                    GetGear(index).Setup(cxml);
            }
        }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:18,代码来源:GObject.cs


示例11: Setup_AfterAdd

        public override void Setup_AfterAdd(XML cxml)
        {
            base.Setup_AfterAdd(cxml);

            XML xml = cxml.GetNode("ComboBox");
            if (xml == null)
                return;

            string str;
            str = xml.GetAttribute("titleColor");
            if (str != null)
                this.titleColor = ToolSet.ConvertFromHtmlColor(str);
            visibleItemCount = xml.GetAttributeInt("visibleItemCount", visibleItemCount);
            _popupDirection = xml.GetAttribute("direction", _popupDirection);

            XMLList col = xml.Elements("item");
            _items = new string[col.Count];
            _values = new string[col.Count];
            int i = 0;
            foreach (XML ix in col)
            {
                _items[i] = ix.GetAttribute("title");
                _values[i] = ix.GetAttribute("value");
                i++;
            }

            str = xml.GetAttribute("title");
            if (str != null && str.Length > 0)
            {
                this.text = str;
                _selectedIndex = Array.IndexOf(_items, str);
            }
            else if (_items.Length > 0)
            {
                _selectedIndex = 0;
                this.text = _items[0];
            }
            else
                _selectedIndex = -1;
        }
开发者ID:kensong1194717296,项目名称:FairyGUI-unity,代码行数:40,代码来源:GComboBox.cs


示例12: Setup_BeforeAdd

        public override void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;
            str = xml.GetAttribute("url");
            if (str != null)
                _url = str;

            str = xml.GetAttribute("align");
            if (str != null)
                _align = FieldTypes.ParseAlign(str);

            str = xml.GetAttribute("vAlign");
            if (str != null)
                _verticalAlign = FieldTypes.ParseVerticalAlign(str);

            str = xml.GetAttribute("fill");
            if (str != null)
                _fill = FieldTypes.ParseFillType(str);

            _autoSize = xml.GetAttributeBool("autoSize", false);

            str = xml.GetAttribute("errorSign");
            if (str != null)
                showErrorSign = str == "true";

            _playing = xml.GetAttributeBool("playing", true);

            str = xml.GetAttribute("color");
            if (str != null)
                this.color = ToolSet.ConvertFromHtmlColor(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;
            }

            if (_url != null)
                LoadContent();
        }
开发者ID:kensong1194717296,项目名称:FairyGUI-unity,代码行数:47,代码来源:GLoader.cs


示例13: Setup_BeforeAdd

        public override void Setup_BeforeAdd(XML xml)
        {
            string str;
            string type = xml.GetAttribute("type");
            if (type != null && type != "empty")
            {
                _shape = new Shape();
                _shape.gOwner = this;
                displayObject = _shape;
            }

            base.Setup_BeforeAdd(xml);

            if (_shape != null)
            {
                int lineSize;
                str = xml.GetAttribute("lineSize");
                if (str != null)
                    lineSize = int.Parse(str);
                else
                    lineSize = 1;

                Color lineColor;
                str = xml.GetAttribute("lineColor");
                if (str != null)
                    lineColor = ToolSet.ConvertFromHtmlColor(str);
                else
                    lineColor = Color.black;

                Color fillColor;
                str = xml.GetAttribute("fillColor");
                if (str != null)
                    fillColor = ToolSet.ConvertFromHtmlColor(str);
                else
                    fillColor = Color.white;

                if (type == "rect")
                    DrawRect(this.width, this.height, lineSize, lineColor, fillColor);
                else
                    DrawEllipse(this.width, this.height, fillColor);
            }
        }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:42,代码来源:GGraph.cs


示例14: Setup_BeforeAdd

        public override void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;
            string[] arr;

            str = xml.GetAttribute("layout");
            if (str != null)
                _layout = FieldTypes.ParseListLayoutType(str);
            else
                _layout = ListLayoutType.SingleColumn;

            str = xml.GetAttribute("selectionMode");
            if (str != null)
                selectionMode = FieldTypes.ParseListSelectionMode(str);
            else
                selectionMode = ListSelectionMode.Single;

            OverflowType overflow;
            str = xml.GetAttribute("overflow");
            if (str != null)
                overflow = FieldTypes.ParseOverflowType(str);
            else
                overflow = OverflowType.Visible;

            str = xml.GetAttribute("margin");
            if (str != null)
                _margin.Parse(str);

            str = xml.GetAttribute("align");
            if (str != null)
                _align = FieldTypes.ParseAlign(str);

            str = xml.GetAttribute("vAlign");
            if (str != null)
                _verticalAlign = FieldTypes.ParseVerticalAlign(str);

            if (overflow == OverflowType.Scroll)
            {
                ScrollType scroll;
                str = xml.GetAttribute("scroll");
                if (str != null)
                    scroll = FieldTypes.ParseScrollType(str);
                else
                    scroll = ScrollType.Vertical;

                ScrollBarDisplayType scrollBarDisplay;
                str = xml.GetAttribute("scrollBar");
                if (str != null)
                    scrollBarDisplay = FieldTypes.ParseScrollBarDisplayType(str);
                else
                    scrollBarDisplay = ScrollBarDisplayType.Default;

                int scrollBarFlags = xml.GetAttributeInt("scrollBarFlags");

                Margin scrollBarMargin = new Margin();
                str = xml.GetAttribute("scrollBarMargin");
                if (str != null)
                    scrollBarMargin.Parse(str);

                string vtScrollBarRes = null;
                string hzScrollBarRes = null;
                arr = xml.GetAttributeArray("scrollBarRes");
                if (arr != null)
                {
                    vtScrollBarRes = arr[0];
                    hzScrollBarRes = arr[1];
                }

                SetupScroll(scrollBarMargin, scroll, scrollBarDisplay, scrollBarFlags, vtScrollBarRes, hzScrollBarRes);
            }
            else
            {
                SetupOverflow(overflow);
            }

            arr = xml.GetAttributeArray("clipSoftness");
            if (arr != null)
                this.clipSoftness = new Vector2(int.Parse(arr[0]), int.Parse(arr[1]));

            _lineGap = xml.GetAttributeInt("lineGap");
            _columnGap = xml.GetAttributeInt("colGap");
            _lineItemCount = xml.GetAttributeInt("lineItemCount");
            defaultItem = xml.GetAttribute("defaultItem");

            autoResizeItem = xml.GetAttributeBool("autoItemSize", true);

            XMLList.Enumerator et = xml.GetEnumerator("item");
            while (et.MoveNext())
            {
                XML ix = et.Current;
                string url = ix.GetAttribute("url");
                if (string.IsNullOrEmpty(url))
                {
                    url = defaultItem;
                    if (string.IsNullOrEmpty(url))
                        continue;
                }

//.........这里部分代码省略.........
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:101,代码来源:GList.cs


示例15: Setup_BeforeAdd

        public override void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;
            str = xml.GetAttribute("layout");
            if (str != null)
                _layout = FieldTypes.ParseListLayoutType(str);
            else
                _layout = ListLayoutType.SingleColumn;

            str = xml.GetAttribute("selectionMode");
            if (str != null)
                selectionMode = FieldTypes.ParseListSelectionMode(str);
            else
                selectionMode = ListSelectionMode.Single;

            OverflowType overflow;
            str = xml.GetAttribute("overflow");
            if (str != null)
                overflow = FieldTypes.ParseOverflowType(str);
            else
                overflow = OverflowType.Visible;

            ScrollType scroll;
            str = xml.GetAttribute("scroll");
            if (str != null)
                scroll = FieldTypes.ParseScrollType(str);
            else
                scroll = ScrollType.Vertical;

            ScrollBarDisplayType scrollBarDisplay;
            str = xml.GetAttribute("scrollBar");
            if (str != null)
                scrollBarDisplay = FieldTypes.ParseScrollBarDisplayType(str);
            else
                scrollBarDisplay = ScrollBarDisplayType.Default;

            int scrollBarFlags = xml.GetAttributeInt("scrollBarFlags");

            Margin scrollBarMargin = new Margin();
            str = xml.GetAttribute("scrollBarMargin");
            if (str != null)
                scrollBarMargin.Parse(str);

            str = xml.GetAttribute("margin");
            if (str != null)
                _margin.Parse(str);

            SetupOverflowAndScroll(overflow, scrollBarMargin, scroll, scrollBarDisplay, scrollBarFlags);

            string[] arr = xml.GetAttributeArray("clipSoftness");
            if (arr != null)
                this.clipSoftness = new Vector2(int.Parse(arr[0]), int.Parse(arr[1]));

            _lineGap = xml.GetAttributeInt("lineGap");
            _columnGap = xml.GetAttributeInt("colGap");
            defaultItem = xml.GetAttribute("defaultItem");

            autoResizeItem = xml.GetAttributeBool("autoItemSize", true);

            XMLList col = xml.Elements("item");
            foreach (XML ix in col)
            {
                string url = ix.GetAttribute("url");
                if (string.IsNullOrEmpty(url))
                    url = defaultItem;
                if (string.IsNullOrEmpty(url))
                    continue;

                GObject obj = AddItemFromPool(url);
                if (obj is GButton)
                {
                    ((GButton)obj).title = ix.GetAttribute("title");
                    ((GButton)obj).icon = ix.GetAttribute("icon");
                }
                else if (obj is GLabel)
                {
                    ((GLabel)obj).title = ix.GetAttribute("title");
                    ((GLabel)obj).icon = ix.GetAttribute("icon");
                }
            }
        }
开发者ID:niuniuzhu,项目名称:FairyGUI-unity,代码行数:83,代码来源:GList.cs


示例16: LoadMovieClip

        void LoadMovieClip(PackageItem item)
        {
            string str = GetDesc(item.id + ".xml");
            XML xml = new XML(str);
            string[] arr = null;

            arr = xml.GetAttributeArray("pivot");
            if (arr != null)
            {
                item.pivot.x = int.Parse(arr[0]);
                item.pivot.y = int.Parse(arr[1]);
            }
            str = xml.GetAttribute("interval");
            if (str != null)
                item.interval = float.Parse(str) / 1000f;
            item.swing = xml.GetAttributeBool("swing", false);
            str = xml.GetAttribute("repeatDelay");
            if (str != null)
                item.repeatDelay = float.Parse(str) / 1000f;
            int frameCount = xml.GetAttributeInt("frameCount");
            item.frames = new Frame[frameCount];

            XMLList frameNodes = xml.GetNode("frames").Elements();

            int i = 0;
            foreach (XML frameNode in frameNodes)
            {
                Frame frame = new Frame();
                arr = frameNode.GetAttributeArray("rect");
                frame.rect = new Rect(int.Parse(arr[0]), int.Parse(arr[1]), int.Parse(arr[2]), int.Parse(arr[3]));
                str = frameNode.GetAttribute("addDelay");
                if (str != null)
                    frame.addDelay = float.Parse(str) / 1000f;

                AtlasSprite sprite;
                if (_sprites.TryGetValue(item.id + "_" + i, out sprite))
                    frame.texture = CreateSpriteTexture(sprite);
                item.frames[i] = frame;
                i++;
            }
        }
开发者ID:aideas,项目名称:F-N-GUI,代码行数:41,代码来源:UIPackage.cs


示例17: ConstructFromXML

        public override void ConstructFromXML(XML cxml)
        {
            base.ConstructFromXML(cxml);

            XML xml = cxml.GetNode("ComboBox");

            string str;

            _buttonController = GetController("button");
            _titleObject = GetChild("title") as GTextField;

            str = xml.GetAttribute("dropdown");
            if (str != null && str.Length > 0)
            {
                dropdown = UIPackage.CreateObjectFromURL(str) as GComponent;
                if (dropdown == null)
                {
                    Debug.LogWarning("FairyGUI: " + this.resourceURL + " should be a component.");
                    return;
                }

                _list = dropdown.GetChild("list") as GList;
                if (_list == null)
                {
                    Debug.LogWarning("FairyGUI: " + this.resourceURL + ": should container a list component named list.");
                    return;
                }
                _list.onClickItem.Add(__clickItem);

                _list.AddRelation(dropdown, RelationType.Width);
                _list.RemoveRelation(dropdown, RelationType.Height);

                dropdown.AddRelation(_list, RelationType.Height);
                dropdown.RemoveRelation(_list, RelationType.Width);
            }

            displayObject.onRollOver.Add(__rollover);
            displayObject.onRollOut.Add(__rollout);
            displayObject.onTouchBegin.Add(__touchBegin);
            displayObject.onTouchEnd.Add(__touchEnd);
        }
开发者ID:kensong1194717296,项目名称:FairyGUI-unity,代码行数:41,代码来源:GComboBox.cs


示例18: Setup_BeforeAdd

        public override void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;
            str = xml.GetAttribute("color");
            if (str != null)
                this.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;
            }
        }
开发者ID:yinlei,项目名称:Fishing,代码行数:24,代码来源:GImage.cs


示例19: ConstructFromXML

        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            LuaUIHelper.ConnectLua(this);
        }
开发者ID:kensong1194717296,项目名称:FairyGUI-unity,代码行数:6,代码来源:LuaUIHelper.cs


示例20: Setup_BeforeAdd

        public override void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;

            str = xml.GetAttribute("frame");
            if (str != null)
                _content.currentFrame = int.Parse(str);
            _content.playing = xml.GetAttributeBool("playing", true);

            str = xml.GetAttribute("color");
            if (str != null)
                this.color = ToolSet.ConvertFromHtmlColor(str);
        }
开发者ID:niuniuzhu,项目名称:FairyGUI-unity,代码行数:15,代码来源:GMovieClip.cs



注:本文中的FairyGUI.Utils.XML类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Alapcontrolok.Vezerloinfo类代码示例发布时间:2022-05-24
下一篇:
C# FairyGUI.GObject类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap