Esempio n. 1
0
 public void RemoveUIPanel(UIPanel panel)
 {
     if (panel.UsesTransform)
     {
         transformedBasePanel.RemoveChild(panel);
     }
     else
     {
         basePanel.RemoveChild(panel);
     }
 }
Esempio 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;
        }
Esempio n. 3
0
 public void RemoveChild(UIPanel child)
 {
     children.Remove(child);
     if (children.Count == 0)
         captureClicks = true;
 }
Esempio n. 4
0
 public void AddUIPanel(UIPanel panel)
 {
     if (panel.UsesTransform)
     {
         transformedBasePanel.AddChild(panel);
     }
     else
     {
         basePanel.AddChild(panel);
     }
 }
Esempio n. 5
0
 public void AddChild(UIPanel child)
 {
     captureClicks = false;
     child.parent = this;
     this.children.Add(child);
     UpdateRectangle();
 }