FairyGUI.GLabel.Setup_AfterAdd C# (CSharp) Method

Setup_AfterAdd() public method

public Setup_AfterAdd ( XML cxml ) : void
cxml FairyGUI.Utils.XML
return void
        public override void Setup_AfterAdd(XML cxml)
        {
            base.Setup_AfterAdd(cxml);

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

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

            if (_titleObject is GTextInput)
            {
                GTextInput input = ((GTextInput)_titleObject);
                str = xml.GetAttribute("prompt");
                if (str != null)
                    input.promptText = str;

                str = xml.GetAttribute("restrict");
                if (str != null)
                    input.restrict = str;

                input.maxLength = xml.GetAttributeInt("maxLength", input.maxLength);
                input.keyboardType = xml.GetAttributeInt("keyboardType", input.keyboardType);
                input.displayAsPassword = xml.GetAttributeBool("password", input.displayAsPassword);
            }
        }

Usage Example

 static public int Setup_AfterAdd(IntPtr l)
 {
     try {
         FairyGUI.GLabel    self = (FairyGUI.GLabel)checkSelf(l);
         FairyGUI.Utils.XML a1;
         checkType(l, 2, out a1);
         self.Setup_AfterAdd(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.GLabel::Setup_AfterAdd