mirror of https://github.com/ppy/osu
Add better ToString output from SkinInfo
This commit is contained in:
parent
397b06283a
commit
ec851648da
|
@ -47,7 +47,7 @@ private void load(OsuConfigManager config, SkinManager skins)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
void reloadSkins() => skinDropdown.Items = skins.GetAllUsableSkins().Select(s => new KeyValuePair<string, int>(s.Name, s.ID));
|
void reloadSkins() => skinDropdown.Items = skins.GetAllUsableSkins().Select(s => new KeyValuePair<string, int>(s.ToString(), s.ID));
|
||||||
skins.ItemAdded += _ => reloadSkins();
|
skins.ItemAdded += _ => reloadSkins();
|
||||||
skins.ItemRemoved += _ => reloadSkins();
|
skins.ItemRemoved += _ => reloadSkins();
|
||||||
|
|
||||||
|
|
|
@ -24,5 +24,7 @@ public class SkinInfo : IHasFiles<SkinFileInfo>, IEquatable<SkinInfo>, IHasPrima
|
||||||
public static SkinInfo Default { get; } = new SkinInfo { Name = "osu!lazer", Creator = "team osu!" };
|
public static SkinInfo Default { get; } = new SkinInfo { Name = "osu!lazer", Creator = "team osu!" };
|
||||||
|
|
||||||
public bool Equals(SkinInfo other) => other != null && ID == other.ID;
|
public bool Equals(SkinInfo other) => other != null && ID == other.ID;
|
||||||
|
|
||||||
|
public override string ToString() => $"\"{Name}\" by {Creator}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue