Exemplo n.º 1
0
 public void RemoveUIPanel(UIPanel panel)
 {
     if (panel.UsesTransform)
     {
         transformedBasePanel.RemoveChild(panel);
     }
     else
     {
         basePanel.RemoveChild(panel);
     }
 }
Exemplo n.º 2
0
        public virtual void Load()
        {
            loaded = true;
            content = new ContentManager(parent.Parent.Services);
            content.RootDirectory = "Content";
            device = parent.GraphicsDevice;
            spriteBatch = new SpriteBatch(device);
            TextureManager.Initilize(this.content);
            AudioManager.Initilize(this.content);

            basePanel = new UIPanel(0, 0, Parent.BackBufferWidth, Parent.BackBufferHeight,Color.White, 0.0f, false);
            basePanel.CaptureClicks = false;
            transformedBasePanel = new UIPanel(0, 0, Parent.BackBufferWidth, Parent.BackBufferHeight, Color.White, 0.0f, true);
            transformedBasePanel.CaptureClicks = false;
        }
Exemplo n.º 3
0
 public void RemoveChild(UIPanel child)
 {
     children.Remove(child);
     if (children.Count == 0)
         captureClicks = true;
 }
Exemplo n.º 4
0
 public void AddUIPanel(UIPanel panel)
 {
     if (panel.UsesTransform)
     {
         transformedBasePanel.AddChild(panel);
     }
     else
     {
         basePanel.AddChild(panel);
     }
 }
Exemplo n.º 5
0
 public void AddChild(UIPanel child)
 {
     captureClicks = false;
     child.parent = this;
     this.children.Add(child);
     UpdateRectangle();
 }