public XNAButton(ParentComponent parent, Rectangle bounds, String text) : base(parent, bounds) { this.text = text; parent.AddChild(this); MouseManager.GetInstance().mouseClickedListeners += OnMouseClick; MouseManager.GetInstance().mouseReleasedListeners += OnMouseRelease; }
public ChildComponent(ParentComponent parent, Rectangle bounds) : base(bounds) { this.parent = parent; parent.AddChild(this); this.enabled = true; this.backgroundColor = Color.Red; this.font = DEFAULT_FONT; this.fontColor = DEFAULT_FONT_COLOR; this.padding = new Padding(5, 5, 5, 5); this.text = ""; }