Search by difficulty methods and current WIP folder (Search Oni/Ura Lv.8 charts for now)
This commit is contained in:
parent
7ef809da14
commit
d0bfd0a340
@ -168,11 +168,12 @@ namespace TJAPlayer3
|
||||
return childList;
|
||||
}
|
||||
|
||||
// Generate recently played songs folder
|
||||
public static List<C曲リストノード> tFetchRecentlyPlayedSongsFolder(C曲リストノード parent)
|
||||
{
|
||||
List<C曲リストノード> childList = new List<C曲リストノード>();
|
||||
|
||||
foreach (string id in TJAPlayer3.RecentlyPlayedSongs.data.recentlyplayedsongs[TJAPlayer3.SaveFile])
|
||||
foreach (string id in TJAPlayer3.RecentlyPlayedSongs.data.recentlyplayedsongs[TJAPlayer3.SaveFile].Reverse())
|
||||
{
|
||||
var node = tReadaptChildNote(parent, tGetNodeFromID(id));
|
||||
if (node != null)
|
||||
@ -191,6 +192,34 @@ namespace TJAPlayer3
|
||||
return childList;
|
||||
}
|
||||
|
||||
// Generate search by difficulty folder
|
||||
public static List<C曲リストノード> tFetchSongsByDifficulty(C曲リストノード parent, int difficulty = (int)Difficulty.Oni, int level = 8)
|
||||
{
|
||||
List<C曲リストノード> childList = new List<C曲リストノード>();
|
||||
|
||||
foreach (C曲リストノード nodeT in nodes.Values)
|
||||
{
|
||||
var score = nodeT.nLevel;
|
||||
if (score[difficulty] == level
|
||||
|| (difficulty == (int)Difficulty.Oni && score[(int)Difficulty.Edit] == level)) // Oni includes Ura
|
||||
{
|
||||
var node = tReadaptChildNote(parent, nodeT);
|
||||
if (node != null)
|
||||
{
|
||||
childList.Add(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Generate back buttons
|
||||
|
||||
string favPath = "./" + parent.strタイトル + "/";
|
||||
|
||||
tReinsertBackButtons(parent, childList, favPath);
|
||||
|
||||
return childList;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [Score tables methods]
|
||||
|
@ -657,9 +657,10 @@ namespace TJAPlayer3
|
||||
}
|
||||
break;
|
||||
case C曲リストノード.Eノード種別.BOX:
|
||||
{
|
||||
{
|
||||
|
||||
#region [Pre-generated folders]
|
||||
|
||||
// Pre-generate the favorite folder if the folder's genre is "Favorite"
|
||||
if (this.act曲リスト.r現在選択中の曲.strジャンル == "Favorite")
|
||||
{
|
||||
this.act曲リスト.r現在選択中の曲.list子リスト = CSongDict.tFetchFavoriteFolder(this.act曲リスト.r現在選択中の曲);
|
||||
@ -668,7 +669,14 @@ namespace TJAPlayer3
|
||||
{
|
||||
this.act曲リスト.r現在選択中の曲.list子リスト = CSongDict.tFetchRecentlyPlayedSongsFolder(this.act曲リスト.r現在選択中の曲);
|
||||
}
|
||||
|
||||
else if (this.act曲リスト.r現在選択中の曲.strジャンル == "SearchD")
|
||||
{
|
||||
// Todo : Add a small prompt to choose the difficulty
|
||||
this.act曲リスト.r現在選択中の曲.list子リスト = CSongDict.tFetchSongsByDifficulty(this.act曲リスト.r現在選択中の曲, (int)Difficulty.Oni, 8);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
CSongSelectSongManager.disable();
|
||||
|
||||
TJAPlayer3.Skin.sound決定音.t再生する();
|
||||
|
11
Test/Songs/X3 Search By Difficulty/box.def
Normal file
11
Test/Songs/X3 Search By Difficulty/box.def
Normal file
@ -0,0 +1,11 @@
|
||||
#TITLE:Search by difficulty
|
||||
#GENRE:SearchD
|
||||
#FORECOLOR:#FFFFFF
|
||||
#BACKCOLOR:#213d18
|
||||
#BOXEXPLANATION1:Search and play songs that
|
||||
#BOXEXPLANATION2:fit your level !
|
||||
#BOXEXPLANATION3:(WIP, currently set to Oni 8)
|
||||
#BGTYPE:1
|
||||
#BOXTYPE:0
|
||||
#BOXCOLOR:#5ac736
|
||||
#BGCOLOR:#80e65e
|
Loading…
x
Reference in New Issue
Block a user