diff options
| author | aldrikboy <aldrikboy@gmail.com> | 2018-01-17 14:26:43 +0100 |
|---|---|---|
| committer | aldrikboy <aldrikboy@gmail.com> | 2018-01-17 14:26:43 +0100 |
| commit | af0ba50d00722e1b7330d1f9b1d23bd3b07a5567 (patch) | |
| tree | fbd7f63dc9bdfc4f1019c03b8f6bf7accb2dce7d /Penguloon/Controls/MuteButton.cs | |
| parent | a9daa029db68962603905eded0e29c2a2e2abd91 (diff) | |
upgrades
Diffstat (limited to 'Penguloon/Controls/MuteButton.cs')
| -rw-r--r-- | Penguloon/Controls/MuteButton.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Penguloon/Controls/MuteButton.cs b/Penguloon/Controls/MuteButton.cs index fdd1d91..a8d415d 100644 --- a/Penguloon/Controls/MuteButton.cs +++ b/Penguloon/Controls/MuteButton.cs @@ -5,8 +5,6 @@ namespace Penguloon.Controls { public class MuteButton : ControlBase { - public bool Muted { get; set; } = false; - public MuteButton(SceneBase parentScene, Vector2 position, Vector2 size) : base(parentScene, position, size) { this.BackgroundIdle = ContentManager.GetTexture("UI/BtnMuteIdle"); @@ -23,11 +21,9 @@ namespace Penguloon.Controls private void Button_OnClick(object sender, ClickArgs e) { - Muted = !Muted; - - SoundManager.Muted = Muted; + SoundManager.Muted = !SoundManager.Muted; - if (Muted) + if (SoundManager.Muted) { this.BackgroundIdle = ContentManager.GetTexture("UI/BtnUnmuteIdle"); this.BackgroundPressed = ContentManager.GetTexture("UI/BtnUnmutePressed"); |
