示例#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;
            }
        }
示例#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;
        }
示例#3
0
 public void AddChild(Widget w)
 {
     children.Add(w);
     w.parent = this;
 }