diff options
| author | aldrikboy <aldrikboy@gmail.com> | 2017-12-22 20:30:25 +0100 |
|---|---|---|
| committer | aldrikboy <aldrikboy@gmail.com> | 2017-12-22 20:30:25 +0100 |
| commit | 1276593bfbbfcdbac24b48cf8b574da25945d763 (patch) | |
| tree | 3d9e8a4153b5b369184b7c7de55461bd1573d30a /Penguloon/Controls/SpeedButton.cs | |
| parent | 12c565cbb7208b44bd7654289bbac2824901f118 (diff) | |
ZULUL
Diffstat (limited to 'Penguloon/Controls/SpeedButton.cs')
| -rw-r--r-- | Penguloon/Controls/SpeedButton.cs | 28 |
1 files changed, 28 insertions, 0 deletions
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 |
