mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 17:53:21 +08: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;
|
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);
|
CurrentSkinInfo.ValueChanged += info => CurrentSkin.Value = GetSkin(info);
|
||||||
CurrentSkin.ValueChanged += skin =>
|
CurrentSkin.ValueChanged += skin =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user