mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Switch back to default skin when the user selected skin is deleted
This commit is contained in:
parent
fb1e8fbdcf
commit
43824c2a94
@ -93,6 +93,12 @@ namespace osu.Game.Skinning
|
||||
{
|
||||
this.audio = audio;
|
||||
|
||||
ItemRemoved += removedInfo => {
|
||||
// check the removed skin is not the current user choice. if it is, switch back to default.
|
||||
if (removedInfo.ID == CurrentSkinInfo.Value.ID)
|
||||
CurrentSkinInfo.Value = SkinInfo.Default;
|
||||
};
|
||||
|
||||
CurrentSkinInfo.ValueChanged += info => CurrentSkin.Value = GetSkin(info);
|
||||
CurrentSkin.ValueChanged += skin =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user