Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 public void AddChild(Widget w)
 {
     children.Add(w);
     w.parent = this;
 }