FairyGUI.Utils.HtmlElement.Get C# (CSharp) Method

Get() public method

public Get ( string attrName ) : object
attrName string
return object
        public object Get(string attrName)
        {
            if (attributes == null)
                return null;

            return attributes[attrName];
        }

Usage Example

示例#1
0
        public void Create(RichTextField owner, HtmlElement element)
        {
            _owner   = owner;
            _element = element;

            if (comboBox == null)
            {
                return;
            }

            int width  = element.GetInt("width", 0);
            int height = element.GetInt("height", 0);

            if (width == 0)
            {
                width = comboBox.sourceWidth;
            }
            if (height == 0)
            {
                height = comboBox.sourceHeight;
            }

            comboBox.SetSize(width, height);
            comboBox.items  = (string[])element.Get("items");
            comboBox.values = (string[])element.Get("values");
            comboBox.value  = element.GetString("value");
        }
All Usage Examples Of FairyGUI.Utils.HtmlElement::Get