2 using System.Collections.Generic;
\r
4 using System.Diagnostics;
\r
5 using System.Drawing;
\r
11 internal class CActSelect演奏履歴パネル : CActivity
\r
15 public CActSelect演奏履歴パネル()
\r
17 base.b活性化してない = true;
\r
19 public void t選択曲が変更された()
\r
21 Cスコア cスコア = CDTXMania.stage選曲.r現在選択中のスコア;
\r
22 if( ( cスコア != null ) && !CDTXMania.stage選曲.bスクロール中 )
\r
26 Bitmap image = new Bitmap( (int)(400 * Scale.X), (int)(130 * Scale.Y) );
\r
27 Graphics graphics = Graphics.FromImage( image );
\r
28 graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
\r
29 for ( int i = 0; i < 5; i++ )
\r
31 if( ( cスコア.譜面情報.演奏履歴[ i ] != null ) && ( cスコア.譜面情報.演奏履歴[ i ].Length > 0 ) )
\r
33 graphics.DrawString( cスコア.譜面情報.演奏履歴[ i ], this.ft表示用フォント, Brushes.Yellow, (float) 0f, (float) ( i * 24f * Scale.Y ) );
\r
37 if( this.tx文字列パネル != null )
\r
39 this.tx文字列パネル.Dispose();
\r
41 this.tx文字列パネル = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );
\r
42 this.tx文字列パネル.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f );
\r
45 catch( CTextureCreateFailedException )
\r
47 Trace.TraceError( "演奏履歴文字列テクスチャの作成に失敗しました。" );
\r
48 this.tx文字列パネル = null;
\r
56 public override void On活性化()
\r
58 this.n本体X = (int)(0x195 * Scale.X);
\r
59 this.n本体Y = (int)(0x174 * Scale.Y);
\r
60 this.ft表示用フォント = new Font( "Arial", 26f * Scale.Y, FontStyle.Bold, GraphicsUnit.Pixel );
\r
63 public override void On非活性化()
\r
65 if( this.ft表示用フォント != null )
\r
67 this.ft表示用フォント.Dispose();
\r
68 this.ft表示用フォント = null;
\r
70 this.ct登場アニメ用 = null;
\r
73 public override void OnManagedリソースの作成()
\r
75 if( !base.b活性化してない )
\r
77 this.txパネル本体 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect play history panel.png" ), true );
\r
79 base.OnManagedリソースの作成();
\r
82 public override void OnManagedリソースの解放()
\r
84 if( !base.b活性化してない )
\r
86 CDTXMania.tテクスチャの解放( ref this.txパネル本体 );
\r
87 CDTXMania.tテクスチャの解放( ref this.tx文字列パネル );
\r
88 base.OnManagedリソースの解放();
\r
91 public override int On進行描画()
\r
93 if( !base.b活性化してない )
\r
95 if( base.b初めての進行描画 )
\r
97 this.ct登場アニメ用 = new CCounter( 0, 100, 5, CDTXMania.Timer );
\r
98 base.b初めての進行描画 = false;
\r
100 this.ct登場アニメ用.t進行();
\r
101 if( this.ct登場アニメ用.b終了値に達した || ( this.txパネル本体 == null ) )
\r
103 this.n本体X = (int)(0x195 * Scale.X);
\r
104 this.n本体Y = (int)(0x174 * Scale.Y);
\r
108 double num = ( (double) this.ct登場アニメ用.n現在の値 ) / 100.0;
\r
109 double num2 = Math.Cos( ( 1.5 + ( 0.5 * num ) ) * Math.PI );
\r
110 this.n本体X = (int)(0x195 * Scale.X);
\r
111 this.n本体Y = (int)(0x174 * Scale.Y) + ( (int) ( this.txパネル本体.sz画像サイズ.Height * ( 1.0 - ( num2 * num2 ) ) ) );
\r
113 if( this.txパネル本体 != null )
\r
115 this.txパネル本体.t2D描画( CDTXMania.app.Device, this.n本体X, this.n本体Y );
\r
117 if( this.tx文字列パネル != null )
\r
119 this.tx文字列パネル.t2D描画( CDTXMania.app.Device, this.n本体X + (int)(12 * Scale.X), this.n本体Y + (int)(0x13 * Scale.Y) );
\r
128 #region [ private ]
\r
129 //-----------------
\r
130 private CCounter ct登場アニメ用;
\r
131 private Font ft表示用フォント;
\r
134 private CTexture txパネル本体;
\r
135 private CTexture tx文字列パネル;
\r
136 //-----------------
\r