mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-12-25 01:39:23 +01:00
made UiStyle's ActionSound a SoundEffectInstance to allow for volume/pitch changes
This commit is contained in:
parent
d891e19d2a
commit
7dc08afa5a
2 changed files with 4 additions and 4 deletions
|
@ -892,8 +892,8 @@ namespace MLEM.Ui.Elements {
|
|||
/// <param name="style">The new style</param>
|
||||
protected virtual void InitStyle(UiStyle style) {
|
||||
this.SelectionIndicator.SetFromStyle(style.SelectionIndicator);
|
||||
this.ActionSound.SetFromStyle(style.ActionSound?.CreateInstance());
|
||||
this.SecondActionSound.SetFromStyle(style.ActionSound?.CreateInstance());
|
||||
this.ActionSound.SetFromStyle(style.ActionSound);
|
||||
this.SecondActionSound.SetFromStyle(style.ActionSound);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -133,10 +133,10 @@ namespace MLEM.Ui.Style {
|
|||
/// </summary>
|
||||
public float TextScale = 1;
|
||||
/// <summary>
|
||||
/// The <see cref="SoundEffect"/> that should be played when an element's <see cref="Element.OnPressed"/> and <see cref="Element.OnSecondaryPressed"/> events are called.
|
||||
/// The <see cref="SoundEffectInstance"/> that should be played when an element's <see cref="Element.OnPressed"/> and <see cref="Element.OnSecondaryPressed"/> events are called.
|
||||
/// Note that this sound is only played if the callbacks have any subscribers.
|
||||
/// </summary>
|
||||
public SoundEffect ActionSound;
|
||||
public SoundEffectInstance ActionSound;
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue