using Microsoft.Xna.Framework; using Penguloon.Scenes; namespace Penguloon.Controls { public class Button : ControlBase { public Button(SceneBase parentScene, Vector2 position, Vector2 size, string text) : base(parentScene, position, size) { this.BackgroundIdle = ContentManager.GetTexture("UI/btnIdle"); this.BackgroundPressed = ContentManager.GetTexture("UI/btnPressed"); this.BackgroundDisabled = ContentManager.GetTexture("UI/btnDisabled"); this.Text = text; this.ForeColor = Color.Gray; this.BorderColor = Color.Gray; this.BorderWidth = 0; this.Font = ContentManager.GetFont(StaticUIValues.MenuFont); OnClick += Button_OnClick; } private void Button_OnClick(object sender, ClickArgs e) { SoundManager.PlayClickSound(); } } }