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