Exemplo n.º 1
0
 public void RemoveChild(UIElement child)
 {
     if (children.Remove(child))
     {
         clickActions.Remove(child);
         UpdateLayout();
     }
 }
Exemplo n.º 2
0
 public void AddChild(UIElement child, Action action = null)
 {
     if (!children.Contains(child))
     {
         children.Add(child);
         clickActions.Add(child, action);
         UpdateLayout();
     }
 }
Exemplo n.º 3
0
 private bool DispatchPressed(int x, int y)
 {
     foreach (Panel obj in DrawableUIElemts)
     {
         if (obj.OnMousePressed(x, y))
         {
             CurrerentElement = panel;
             return true;
         }
     }
     return false;
 }
Exemplo n.º 4
0
 private bool DispatchReleased(int x, int y)
 {
     if (CurrerentElement != null)
     {
         foreach (Panel obj in DrawableUIElemts)
         {
             if (obj.OnMouseReleased(x, y))
             {
                 CurrerentElement = null;
                 return true;
             }
         }
     }
     return false;
 }