public Widget(Widget p = null) { parent = p; if (device == null) { Console.WriteLine("Error: You must call Widget.Init(...) before using any widget."); } if (parent != null) { parent.AddChild(this); strictly_bound = parent.strictly_bound; } }
public Tooltip(string message, Vector2 position,Widget p = null) : base(p) { destination.X = (int)position.X; destination.Y = (int)position.Y; if (font == null) { font = Content.Load<SpriteFont>("mainfont"); } Message = message; Show = true; drawable = true; }
public void AddChild(Widget w) { children.Add(w); w.parent = this; }