1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-06-08 15:51:35 +02:00

made instances be unique for each element

This commit is contained in:
Ellpeck 2020-01-14 22:41:52 +01:00
parent 9aebce96e8
commit 2ac28eced3
2 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -37,7 +37,7 @@ namespace MLEM.Ui.Style {
public IGenericFont ItalicFont;
public FormatSettings FormatSettings;
public float TextScale = 1;
public SoundEffectInstance ActionSound;
public SoundEffect ActionSound;
}
}