OSDN Git Service

Users.xml に ScalingMovie オプションを追加。
authorくまかみ工房 <kumakamikoubou@gmail.com>
Sun, 20 Nov 2016 05:22:19 +0000 (14:22 +0900)
committerくまかみ工房 <kumakamikoubou@gmail.com>
Sun, 20 Nov 2016 05:22:19 +0000 (14:22 +0900)
StrokeStyleT/StrokeStyleT.cs
StrokeStyleT/ステージ/演奏/演奏ステージ.cs
StrokeStyleT/ユーザ/XML.cs
StrokeStyleT/ユーザ/ユーザ.cs

index 25917f0..66bdbba 100644 (file)
@@ -401,6 +401,13 @@ namespace SST
                        //----------------
                        #endregion
 
+                       #region " ユーザ情報を保存する。"
+                       //----------------
+                       // 要素が増えたときのため、変更がなくても保存する。
+                       StrokeStyleT.ユーザ管理.UsersXmlを保存する();
+                       //----------------
+                       #endregion
+
                        #region " デバイスリソースを解放する。"
                        //----------------
                        FDK.Utilities.解放する( ref this._デバイスリソース );
index 2e823d0..f428314 100644 (file)
@@ -209,12 +209,32 @@ namespace SST.ステージ.演奏
                        }
                        //----------------
                        #endregion
-                       #region " 背景動画とBGMの開始/進行描画を行う。"
+
+                       #region " 背景動画とBGMの開始と進行描画。"
                        //----------------
                        if( this._背景動画開始済み.Value )
                        {
+                               float width = dr.設計画面サイズdpx.Width;
+                               float height = dr.設計画面サイズdpx.Height;
+
                                // 背景動画チップがヒット済みなら、背景動画の進行描画を行う。
-                               this._背景動画?.進行描画する( dr, new SharpDX.RectangleF( 0f, 0f, dr.設計画面サイズdpx.Width, dr.設計画面サイズdpx.Height ) );
+                               if( StrokeStyleT.ユーザ管理.現在選択されているユーザ.動画の縮小表示 )
+                               {
+                                       this._背景動画?.進行描画する( dr, new SharpDX.RectangleF( 0f, 0f, width, height ), 0.2f );  // 全体
+
+                                       float 拡大縮小率 = 0.75f;
+                                       float 上移動dpx = 100.0f;
+
+                                       this._背景動画?.進行描画する( dr, new SharpDX.RectangleF(
+                                               width * ( 1f - 拡大縮小率 ) / 2f,
+                                               height * ( 1f - 拡大縮小率 ) / 2f - 上移動dpx,
+                                               width * 拡大縮小率,
+                                               height * 拡大縮小率 ) );
+                               }
+                               else
+                               {
+                                       this._背景動画?.進行描画する( dr, new SharpDX.RectangleF( 0f, 0f, width, height ), 1.0f );
+                               }
 
                                // 動画が重たいかもしれないので、演奏時刻をここで再度取得する。
                                演奏時刻sec = this._現在の演奏時刻secを返す();
index 76d70bd..3c9d408 100644 (file)
@@ -40,6 +40,8 @@ namespace SST.ユーザ
                Tom3,
                RightCrash,
 
+               ScalingMovie,
+
                // 要素値
                Left,
                Right,
index 964b47d..d421d90 100644 (file)
@@ -53,6 +53,8 @@ namespace SST.ユーザ
 
                public double 譜面スクロール速度の倍率 { get; set; } = 1.0;
 
+               public bool 動画の縮小表示 { get; set; } = false;
+
                /// <remarks>
                ///             ビュアーモードでログインしているユーザの場合、RootNode の子Nodeはゼロである。
                /// </remarks>
@@ -175,7 +177,9 @@ namespace SST.ユーザ
                                        new XElement( nameof( XML.Tom1 ), this.AutoPlay.Tom1 ),
                                        new XElement( nameof( XML.Tom2 ), this.AutoPlay.Tom2 ),
                                        new XElement( nameof( XML.Tom3 ), this.AutoPlay.Tom3 ),
-                                       new XElement( nameof( XML.RightCrash ), this.AutoPlay.RightCrash ) )
+                                       new XElement( nameof( XML.RightCrash ), this.AutoPlay.RightCrash ) ),
+
+                               new XElement( nameof( XML.ScalingMovie ), this.動画の縮小表示 )
                        );
 
                        親要素.Add( user );
@@ -468,6 +472,19 @@ namespace SST.ユーザ
                                }
                                //----------------
                                #endregion
+                               #region " <ScalingMovie> "
+                               //----------------
+                               try
+                               {
+                                       this.動画の縮小表示 = (bool) user要素.Element( nameof( XML.ScalingMovie ) );
+                               }
+                               catch( Exception e )
+                               {
+                                       FDK.Log.ERROR( $"<{XML.User}>.<{XML.ScalingMovie}> の読み込みに失敗しました。{e.Message}" );
+                                       this.動画の縮小表示 = false;    // 既定値は false
+                               }
+                               //----------------
+                               #endregion
                        }
                }