diff --git a/MLEM.Ui/Elements/Element.cs b/MLEM.Ui/Elements/Element.cs index 1b46b05..42bbeba 100644 --- a/MLEM.Ui/Elements/Element.cs +++ b/MLEM.Ui/Elements/Element.cs @@ -501,8 +501,8 @@ namespace MLEM.Ui.Elements { protected virtual void InitStyle(UiStyle style) { this.SelectionIndicator.SetFromStyle(style.SelectionIndicator); - this.ActionSound.SetFromStyle(style.ActionSound); - this.SecondActionSound.SetFromStyle(style.ActionSound); + this.ActionSound.SetFromStyle(style.ActionSound?.CreateInstance()); + this.SecondActionSound.SetFromStyle(style.ActionSound?.CreateInstance()); } public delegate void TextInputCallback(Element element, Keys key, char character); diff --git a/MLEM.Ui/Style/UiStyle.cs b/MLEM.Ui/Style/UiStyle.cs index 1d55bd6..71142a8 100644 --- a/MLEM.Ui/Style/UiStyle.cs +++ b/MLEM.Ui/Style/UiStyle.cs @@ -37,7 +37,7 @@ namespace MLEM.Ui.Style { public IGenericFont ItalicFont; public FormatSettings FormatSettings; public float TextScale = 1; - public SoundEffectInstance ActionSound; + public SoundEffect ActionSound; } } \ No newline at end of file