diff options
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"); |
