diff --git a/TJAPlayer3/Common/CConfigIni.cs b/TJAPlayer3/Common/CConfigIni.cs index 0894c510..fcf92349 100644 --- a/TJAPlayer3/Common/CConfigIni.cs +++ b/TJAPlayer3/Common/CConfigIni.cs @@ -1036,7 +1036,9 @@ namespace TJAPlayer3 public bool FastRender; // 事前画像描画モード public int MusicPreTimeMs; // 音源再生前の待機時間ms - + public bool TJAP3FolderMode { get; private set; } + + /// /// DiscordのRitch Presenceに再生中の.tjaファイルの情報を送信するかどうか。 @@ -1616,7 +1618,8 @@ namespace TJAPlayer3 this.bEndingAnime = false; this.nPlayerCount = 1; //2017.08.18 kairera0467 マルチプレイ対応 ShinuchiMode = true; // Enable gen-4 score by default - FastRender = true; + TJAP3FolderMode = false; + FastRender = true; MusicPreTimeMs = 1000; // 一秒 SendDiscordPlayingInformation = true; #region[ Ver.K追加 ] @@ -1970,7 +1973,7 @@ namespace TJAPlayer3 //sw.WriteLine( "; (If you feel illegal seek with mp3, please set it to 1.)" ); // //sw.WriteLine( "NoMP3Streaming={0}", this.bNoMP3Streaming ? 1 : 0 ); // //sw.WriteLine(); - sw.WriteLine( "; 動画再生にDirectShowを使用する(0:OFF, 1:ON)" ); + sw.WriteLine( "; 動画再生にDirectShowを使用する(0:OFF, 1:ON)" ); sw.WriteLine( "; 動画再生にDirectShowを使うことによって、再生時の負担を軽減できます。"); sw.WriteLine( "; ただし使用時にはセットアップが必要になるのでご注意ください。"); sw.WriteLine( "DirectShowMode={0}", this.bDirectShowMode ? 1 : 0 ); @@ -1988,7 +1991,10 @@ namespace TJAPlayer3 sw.WriteLine( "JudgeLinePosOffsetDrums={0}", this.nJudgeLinePosOffset.Drums ); // sw.WriteLine(); #endregion - sw.WriteLine( "; 「また遊んでね」画面(0:OFF, 1:ON)" ); + sw.WriteLine("; TJAPlayer3のboxの表示をするかどうか (0:OFF, 1:ON)"); + sw.WriteLine("{0}={1}", nameof(TJAP3FolderMode), TJAP3FolderMode ? 1 : 0); + sw.WriteLine(); + sw.WriteLine( "; 「また遊んでね」画面(0:OFF, 1:ON)" ); sw.WriteLine( "EndingAnime={0}", this.bEndingAnime ? 1 : 0 ); sw.WriteLine(); sw.WriteLine( ";-------------------" ); @@ -2785,8 +2791,12 @@ namespace TJAPlayer3 { this.bDirectShowMode = C変換.bONorOFF( str4[ 0 ] ); ; } - #endregion - else if( str3.Equals( "EndingAnime" ) ) + #endregion + else if (str3.Equals(nameof(TJAP3FolderMode))) + { + TJAP3FolderMode = C変換.bONorOFF(str4[0]); + } + else if( str3.Equals( "EndingAnime" ) ) { this.bEndingAnime = C変換.bONorOFF( str4[ 0 ] ); } diff --git a/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs b/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs index 4da55563..6b6e7381 100644 --- a/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs +++ b/TJAPlayer3/Stages/05.SongSelect/CActSelect曲リスト.cs @@ -82,7 +82,6 @@ namespace TJAPlayer3 // t選択曲が変更された()内で使う、直前の選曲の保持 // (前と同じ曲なら選択曲変更に掛かる再計算を省略して高速化するため) private C曲リストノード song_last = null; - // コンストラクタ @@ -272,23 +271,30 @@ namespace TJAPlayer3 //Trace.TraceInformation( "Skin変更BoxDef : "+ CSkin.strBoxDefSkinSubfolderFullName ); if(r現在選択中の曲.list子リスト.Count != 1) { - List list = TJAPlayer3.Songs管理.list曲ルート; - - // Fill list songs - list.InsertRange(list.IndexOf(this.r現在選択中の曲) + 1, this.r現在選択中の曲.list子リスト); - - // Previous index - int n回数 = this.r現在選択中の曲.Openindex; - if (this.r現在選択中の曲.Openindex >= this.r現在選択中の曲.list子リスト.Count()) - n回数 = 0; + if (TJAPlayer3.ConfigIni.TJAP3FolderMode) + { + this.r現在選択中の曲 = this.r現在選択中の曲.list子リスト[0]; + } + else + { + List list = TJAPlayer3.Songs管理.list曲ルート; + + // Fill list songs + list.InsertRange(list.IndexOf(this.r現在選択中の曲) + 1, this.r現在選択中の曲.list子リスト); + + // Previous index + int n回数 = this.r現在選択中の曲.Openindex; + if (this.r現在選択中の曲.Openindex >= this.r現在選択中の曲.list子リスト.Count()) + n回数 = 0; - for (int index = 0; index <= n回数; index++) - this.r現在選択中の曲 = this.r次の曲(this.r現在選択中の曲); + for (int index = 0; index <= n回数; index++) + this.r現在選択中の曲 = this.r次の曲(this.r現在選択中の曲); + + // Remove main box + list.RemoveAt(list.IndexOf(this.r現在選択中の曲.r親ノード)); + } - // Remove main box - list.RemoveAt(list.IndexOf(this.r現在選択中の曲.r親ノード)); - this.t現在選択中の曲を元に曲バーを再構成する(); this.t選択曲が変更された(false); @@ -320,30 +326,40 @@ namespace TJAPlayer3 // (ユーザーがboxdefスキンをConfig指定している場合への対応のために必要) // tBoxに入る()とは処理が微妙に異なるので注意 TJAPlayer3.Skin.SetCurrentSkinSubfolderFullName( - ( this.r現在選択中の曲.strSkinPath == "" ) ? "" : TJAPlayer3.Skin.GetSkinSubfolderFullNameFromSkinName( CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath ) ), false ); - - // Complete list of songs - List list = TJAPlayer3.Songs管理.list曲ルート; - - // Reinsert parent node - list.Insert(list.IndexOf(this.r現在選択中の曲) + 1, this.r現在選択中の曲.r親ノード); - - // Reindex the parent node - this.r現在選択中の曲.r親ノード.Openindex = r現在選択中の曲.r親ノード.list子リスト.IndexOf(this.r現在選択中の曲); - - // Move song pointer back to the folder - this.r現在選択中の曲 = this.r次の曲(r現在選択中の曲); + ( this.r現在選択中の曲.strSkinPath == "" ) ? "" : TJAPlayer3.Skin.GetSkinSubfolderFullNameFromSkinName( CSkin.GetSkinName( this.r現在選択中の曲.strSkinPath ) ), false ); - // Flatten folder - var flattened = flattenList(this.r現在選択中の曲.list子リスト); - - // Remove recursively the included songs that are contained in the folder - for (int index = 0; index < list.Count; index++) - { - if (flattened.Contains(list[index])) - { - list.RemoveAt(index); - index--; + if (TJAPlayer3.ConfigIni.TJAP3FolderMode) + { + if (this.r現在選択中の曲.r親ノード != null) + { + this.r現在選択中の曲 = this.r現在選択中の曲.r親ノード; + } + } + else + { + // Complete list of songs + List list = TJAPlayer3.Songs管理.list曲ルート; + + // Reinsert parent node + list.Insert(list.IndexOf(this.r現在選択中の曲) + 1, this.r現在選択中の曲.r親ノード); + + // Reindex the parent node + this.r現在選択中の曲.r親ノード.Openindex = r現在選択中の曲.r親ノード.list子リスト.IndexOf(this.r現在選択中の曲); + + // Move song pointer back to the folder + this.r現在選択中の曲 = this.r次の曲(r現在選択中の曲); + + // Flatten folder + var flattened = flattenList(this.r現在選択中の曲.list子リスト); + + // Remove recursively the included songs that are contained in the folder + for (int index = 0; index < list.Count; index++) + { + if (flattened.Contains(list[index])) + { + list.RemoveAt(index); + index--; + } } } @@ -2387,7 +2403,7 @@ namespace TJAPlayer3 if( song == null ) return null; - List list = TJAPlayer3.Songs管理.list曲ルート; + List list = (TJAPlayer3.ConfigIni.TJAP3FolderMode && song.r親ノード != null) ? song.r親ノード.list子リスト : TJAPlayer3.Songs管理.list曲ルート; int index = list.IndexOf( song ); @@ -2404,7 +2420,7 @@ namespace TJAPlayer3 if( song == null ) return null; - List list = TJAPlayer3.Songs管理.list曲ルート; + List list = (TJAPlayer3.ConfigIni.TJAP3FolderMode && song.r親ノード != null) ? song.r親ノード.list子リスト : TJAPlayer3.Songs管理.list曲ルート; int index = list.IndexOf( song );