From 1276593bfbbfcdbac24b48cf8b574da25945d763 Mon Sep 17 00:00:00 2001 From: aldrikboy Date: Fri, 22 Dec 2017 20:30:25 +0100 Subject: ZULUL --- Penguloon/Controls/SpeedButton.cs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Penguloon/Controls/SpeedButton.cs (limited to 'Penguloon/Controls/SpeedButton.cs') diff --git a/Penguloon/Controls/SpeedButton.cs b/Penguloon/Controls/SpeedButton.cs new file mode 100644 index 0000000..ee11d95 --- /dev/null +++ b/Penguloon/Controls/SpeedButton.cs @@ -0,0 +1,28 @@ +using Microsoft.Xna.Framework; +using Penguloon.Scenes; + +namespace Penguloon.Controls +{ + public class SpeedButton : ControlBase + { + public SpeedButton(SceneBase parentScene, Vector2 position, Vector2 size, string text) : base(parentScene, position, size) + { + this.BackgroundIdle = ContentManager.GetTexture(""); + this.BackgroundPressed = ContentManager.GetTexture(""); + this.BackgroundDisabled = ContentManager.GetTexture(""); + this.Text = text; + + this.ForeColor = Color.White; + this.BorderColor = Color.Black; + this.BorderWidth = 2; + this.Font = ContentManager.GetFont(StaticUIValues.MenuFont); + + OnClick += Button_OnClick; + } + + private void Button_OnClick(object sender, ClickArgs e) + { + SoundManager.PlayClickSound(); + } + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2