/// <summary> /// Initializes a new instance of the <see cref="GuiBackground"/> class. /// </summary> public GuiSize(BlackbirdGame game) { this.Game = game; Width = new GuiNullValue <int>(Game); Height = new GuiNullValue <int>(Game); }
/// <summary> /// Initializes a new instance of the <see cref="GuiBackground"/> class. /// </summary> public GuiBackground(BlackbirdGame game) { this.Game = game; Color = new GuiNullValue <Color>(Game); Image = new GuiNullValue <string>(Game); Repeat = new GuiNullValue <GuiRepeatStyle>(Game); }
/// <summary> /// Loads the size information from the specified Xml element. /// </summary> /// <param name="el">The source Xml element.</param> /// <param name="currentFileName">Name of the current file.</param> public void Load(XmlElement el, string currentFileName) { string width = el.GetAttributeOrNull("width"); string height = el.GetAttributeOrNull("height"); Width = GuiValue <int> .Parse(Game, width); Height = GuiValue <int> .Parse(Game, height); }
/// <summary> /// Loads the specified control. /// </summary> /// <param name="element">The element.</param> /// <param name="currentFileName"></param> public override void Load(XmlElement element, string currentFileName) { base.Load(element, currentFileName); this.FaceId = GuiValue <string> .Parse(Game, element.GetAttribute("faceId"), this); this.DataSource = GuiValue <IEnumerable> .Parse(Game, element.GetAttribute("dataSource"), this); this.ChildOffsetX = GuiValue <int> .Parse(Game, element.GetAttributeOrNull("childOffsetX"), this); this.ChildOffsetY = GuiValue <int> .Parse(Game, element.GetAttributeOrNull("childOffsetY"), this); }
/// <summary> /// Loads the background information from the specified Xml element. /// </summary> /// <param name="el">The source Xml element.</param> /// <param name="currentFileName">Name of the current file.</param> public void Load(XmlElement el, string currentFileName) { string color = el.GetAttributeOrNull("color"); string image = el.GetAttributeOrNull("image"); string repeat = el.GetAttributeOrNull("repeat"); Color = GuiValue <Color> .Parse(Game, color); Image = GuiValue <string> .Parse(Game, image); Repeat = GuiValue <GuiRepeatStyle> .Parse(Game, repeat); }
/// <summary> /// Loads the specified control. /// </summary> /// <param name="element">The element.</param> /// <param name="currentFileName"></param> public override void Load(XmlElement element, string currentFileName) { base.Load(element, currentFileName); this.Text = GuiValue <string> .Parse(Game, element.GetAttribute("text"), this); this.Label = GuiValue <string> .Parse(Game, element.GetAttribute("label"), this); this.Color = GuiValue <Color> .Parse(Game, element.GetAttribute("color"), this); this.Font = GuiValue <string> .Parse(Game, element.GetAttribute("font"), this); this.HorizontalAlignment = GuiValue <GuiHorizontalAlign> .Parse(Game, element.GetAttributeOrNull("hAlign") ?? "Left", this); this.VerticalAlignment = GuiValue <GuiVerticalAlign> .Parse(Game, element.GetAttributeOrNull("vAlign") ?? "Top", this); }
/// <summary> /// Loads the specified control. /// </summary> /// <param name="element">The element.</param> public virtual void Load(XmlElement element, string currentFileName) { this.Id = GuiValue <string> .Parse(Game, element.GetAttributeOrNull("id"), this); this.X = GuiValue <int> .Parse(Game, element.GetAttributeOrNull("x"), this); this.Y = GuiValue <int> .Parse(Game, element.GetAttributeOrNull("y"), this); this.Width = GuiValue <int> .Parse(Game, element.GetAttributeOrNull("w"), this); this.Height = GuiValue <int> .Parse(Game, element.GetAttributeOrNull("h"), this); this.Hide = GuiValue <bool> .Parse(Game, element.GetAttributeOrNull("hide"), this); this.MouseClick = GuiEventReference <MouseClickEventArgument> .Parse(Game, element.GetAttributeOrNull("onclick"), this); this.MouseMove = GuiEventReference <MouseMoveEventArgument> .Parse(Game, element.GetAttributeOrNull("onmousemove"), this); }
/// <summary> /// Loads the specified control. /// </summary> /// <param name="element">The element.</param> /// <param name="currentFileName"></param> public override void Load(XmlElement element, string currentFileName) { base.Load(element, currentFileName); this.FaceId = GuiValue <string> .Parse(Game, element.GetAttribute("faceId"), this); }