Esempio n. 1
0
 protected HUDItem(Window win, string name, HUDBase root, HUDItem parent, List <HUDItem> children)
 {
     Win       = win;
     Name      = name;
     Root      = root;
     Parent    = parent;
     _children = children;
 }
Esempio n. 2
0
 public override void DoMouseDown(MouseButtonEventArgs bu)
 {
     _hovered = Over(Win.Mouse);
     foreach (HUDItem item in AllSubChildren)
     {
         item.DoMouseDown(bu);
     }
 }
Esempio n. 3
0
 public HUDCameraController(string name, HUDItem parent) : base(name, parent)
 {
     coords = new HUDRect("coords", this)
     {
         Color    = Util.Color(30, 0, 0),
         mode     = AlignMode.rightAlign | AlignMode.bottomAlign,
         LocalPos = new vec2(1, -1)
     };
 }
Esempio n. 4
0
 public HUDGeom(string name, HUDItem parent) : base(name, parent)
 {
     new HUDRect("test", this)
     {
         Text      = "TEST",
         Color     = Util.Color(100, 100, 100),
         mode      = AlignMode.leftAlign | AlignMode.topAlign,
         LocalPos  = new vec2(-1, 1),
         MouseDown = (self, args) => { if (self.Root.Hovered == self)
                                       {
                                           self.Text = self.Text + "1";
                                       }
         }
     };
 }
Esempio n. 5
0
 public HUDItem Over(vec2 point)
 {
     foreach (HUDItem child in Children)
     {
         HUDItem found = child.Over(point);
         if (found != null)
         {
             return(found);
         }
     }
     if (Hitbox(point))
     {
         return(this);
     }
     return(null);
 }
Esempio n. 6
0
 public EntityManager(HUDBase itemRoot)
 {
     item = new HUDItem("Entity Manager", itemRoot);
 }
Esempio n. 7
0
 public HUDItem(string name, HUDItem parent) : this(parent.Win, name, parent.Root, parent, new List <HUDItem>())
 {
     Parent._children.Add(this);
 }
Esempio n. 8
0
 public void UpdateHovered(vec2 pos)
 {
     _hovered = Over(pos);
 }
Esempio n. 9
0
 public HUDDynamic(string name, HUDItem parent) : base(name, parent)
 {
 }
Esempio n. 10
0
 public HUDRect(string name, HUDItem parent) : base(name, parent)
 {
 }