From 388bd6310f143349577f3b59c1f37a71302ee2cb Mon Sep 17 00:00:00 2001 From: Flamefire Date: Thu, 14 Aug 2014 16:07:06 +0200 Subject: [PATCH] Add GetSong to Categories --- VocaluxeLib/Songs/CCategory.cs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/VocaluxeLib/Songs/CCategory.cs b/VocaluxeLib/Songs/CCategory.cs index 43fc78fb..79f5087c 100644 --- a/VocaluxeLib/Songs/CCategory.cs +++ b/VocaluxeLib/Songs/CCategory.cs @@ -56,18 +56,11 @@ namespace VocaluxeLib.Songs return Songs.Count(sp => !sp.IsSung); } - public CCategory(string name, CTexture coverSmall, CTexture coverBig) + public CSong GetSong(int numInCategory) { - Name = name; - CoverTextureSmall = coverSmall; - CoverTextureBig = coverBig; - } - - public CCategory(CCategory cat) - { - Name = cat.Name; - CoverTextureSmall = cat.CoverTextureSmall; - CoverTextureBig = cat.CoverTextureBig; + if (numInCategory >= 0 && numInCategory < Songs.Count) + return CBase.Songs.GetSongByID(Songs[numInCategory].SongID); + return null; } } } \ No newline at end of file