override public void Setup_BeforeAdd(XML xml) { string str; string type = xml.GetAttribute("type"); if (type != null && type != "empty") { _shape = new Shape(); _shape.gOwner = this; _shape.SetScale(GRoot.contentScaleFactor, GRoot.contentScaleFactor); 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; } string corner; str = xml.GetAttribute("corner"); if (str != null) { corner = str; } DrawRect(this.width, this.height, lineSize, lineColor, fillColor); } }
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; _shape.SetScale(GRoot.contentScaleFactor, GRoot.contentScaleFactor); 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; string corner; str = xml.GetAttribute("corner"); if (str != null) corner = str; DrawRect(this.width, this.height, lineSize, lineColor, fillColor); } }