Favorite songs folder 1st version (need to add back buttons and random, + few visual fixes)
This commit is contained in:
parent
c0c2880b43
commit
a1e6e203d8
52
TJAPlayer3/Common/CSongDict.cs
Normal file
52
TJAPlayer3/Common/CSongDict.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TJAPlayer3
|
||||
{
|
||||
internal class CSongDict
|
||||
{
|
||||
private static Dictionary<string, C曲リストノード> nodes = new Dictionary<string, C曲リストノード>();
|
||||
|
||||
public static C曲リストノード tGetNodeFromID(string id)
|
||||
{
|
||||
if (nodes.ContainsKey(id))
|
||||
return nodes[id].Clone();
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void tAddSongNode(string id, C曲リストノード node)
|
||||
{
|
||||
if (!nodes.ContainsKey(id))
|
||||
nodes.Add(id, node.Clone());
|
||||
}
|
||||
|
||||
#region [Extra methods]
|
||||
|
||||
public static List<C曲リストノード> tFetchFavoriteFolder(C曲リストノード parent)
|
||||
{
|
||||
List<C曲リストノード> childList = new List<C曲リストノード>();
|
||||
|
||||
foreach (string id in TJAPlayer3.Favorites.data.favorites[TJAPlayer3.SaveFile])
|
||||
{
|
||||
var node = tGetNodeFromID(id);
|
||||
if (node != null)
|
||||
{
|
||||
node.r親ノード = parent;
|
||||
node.isChangedBgType = parent.isChangedBgType;
|
||||
node.isChangedBgColor = parent.isChangedBgColor;
|
||||
node.isChangedBoxType = parent.isChangedBoxType;
|
||||
node.isChangedBoxColor = parent.isChangedBoxColor;
|
||||
childList.Add(node);
|
||||
}
|
||||
|
||||
}
|
||||
return childList;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
@ -388,6 +388,8 @@ namespace TJAPlayer3
|
||||
c曲リストノード.nLevel = dtx.LEVELtaiko;
|
||||
c曲リストノード.uniqueId = dtx.uniqueID;
|
||||
|
||||
CSongDict.tAddSongNode(c曲リストノード.uniqueId.data.id, c曲リストノード);
|
||||
|
||||
c曲リストノード.arスコア[ n ] = new Cスコア();
|
||||
c曲リストノード.arスコア[ n ].ファイル情報.ファイルの絶対パス = str基点フォルダ + fileinfo.Name;
|
||||
c曲リストノード.arスコア[ n ].ファイル情報.フォルダの絶対パス = str基点フォルダ;
|
||||
@ -957,6 +959,9 @@ namespace TJAPlayer3
|
||||
}
|
||||
}
|
||||
|
||||
// Removed the pre-made recently played songs folder, so players will have total control on it's shape and visuals
|
||||
|
||||
/*
|
||||
#region [ "最近遊んだ曲"BOXを生成する ]
|
||||
|
||||
if(list曲ルート.Count > 0)
|
||||
@ -990,6 +995,7 @@ namespace TJAPlayer3
|
||||
}
|
||||
|
||||
#endregion
|
||||
*/
|
||||
|
||||
this.t曲リストへ後処理を適用する(this.list曲ルート);
|
||||
|
||||
|
@ -658,6 +658,13 @@ namespace TJAPlayer3
|
||||
break;
|
||||
case C曲リストノード.Eノード種別.BOX:
|
||||
{
|
||||
|
||||
// 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現在選択中の曲);
|
||||
}
|
||||
|
||||
CSongSelectSongManager.disable();
|
||||
|
||||
TJAPlayer3.Skin.sound決定音.t再生する();
|
||||
|
@ -121,6 +121,7 @@
|
||||
<Compile Include="Animations\IAnimatable.cs" />
|
||||
<Compile Include="Animations\Linear.cs" />
|
||||
<Compile Include="Common\CCrypto.cs" />
|
||||
<Compile Include="Common\CSongDict.cs" />
|
||||
<Compile Include="Common\Favorites.cs" />
|
||||
<Compile Include="Common\ConfigManager.cs" />
|
||||
<Compile Include="Common\Discord.cs" />
|
||||
|
0
Test/Songs/X1 Favorite/! Keep this folder empty !
Normal file
0
Test/Songs/X1 Favorite/! Keep this folder empty !
Normal file
10
Test/Songs/X1 Favorite/box.def
Normal file
10
Test/Songs/X1 Favorite/box.def
Normal file
@ -0,0 +1,10 @@
|
||||
#TITLE:Favorite songs
|
||||
#GENRE:Favorite
|
||||
#FORECOLOR:#FFFFFF
|
||||
#BACKCOLOR:#673100
|
||||
#BOXEXPLANATION1:Challenge some of
|
||||
#BOXEXPLANATION2:your favorite songs !
|
||||
#BOXEXPLANATION3:(Toggle with Left CTRL)
|
||||
#BGTYPE:10
|
||||
#BOXTYPE:0
|
||||
#BOXCOLOR:#c71b3b
|
0
Test/Songs/X2 Recent/! Keep this folder empty !
Normal file
0
Test/Songs/X2 Recent/! Keep this folder empty !
Normal file
7
Test/Songs/X2 Recent/box.def
Normal file
7
Test/Songs/X2 Recent/box.def
Normal file
@ -0,0 +1,7 @@
|
||||
#TITLE:Recently played songs
|
||||
#GENRE:最近遊んだ曲
|
||||
#FORECOLOR:#FFFFFF
|
||||
#BACKCOLOR:#164748
|
||||
#BOXEXPLANATION1:Play recently played songs !
|
||||
#BGTYPE:9
|
||||
#BOXTYPE:9
|
Loading…
Reference in New Issue
Block a user