2 using System.Collections.Generic;
\r
3 using System.Diagnostics;
\r
4 using System.Globalization;
\r
6 using System.Runtime.InteropServices;
\r
7 using System.Drawing;
\r
12 internal class CActSelectInformation : CActivity
\r
16 public CActSelectInformation()
\r
18 base.b活性化してない = true;
\r
24 public override void On活性化()
\r
26 this.n画像Index上 = -1;
\r
30 public override void On非活性化()
\r
32 this.ctスクロール用 = null;
\r
35 public override void OnManagedリソースの作成()
\r
37 if( !base.b活性化してない )
\r
39 string[,] infofiles = { // #25381 2011.6.4 yyagi
\r
40 { @"Graphics\ScreenSelect information 1.png", @"Graphics\ScreenSelect information 2.png" },
\r
41 { @"Graphics\ScreenSelect information 1e.png", @"Graphics\ScreenSelect information 2e.png" }
\r
43 int c = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ? 0 : 1;
\r
44 this.txInfo[ 0 ] = TextureFactory.tテクスチャの生成( CSkin.Path( infofiles[ c, 0 ] ), false );
\r
45 this.txInfo[ 1 ] = TextureFactory.tテクスチャの生成( CSkin.Path( infofiles[ c, 1 ] ), false );
\r
46 base.OnManagedリソースの作成();
\r
49 public override void OnManagedリソースの解放()
\r
51 if( !base.b活性化してない )
\r
53 TextureFactory.tテクスチャの解放( ref this.txInfo[ 0 ] );
\r
54 TextureFactory.tテクスチャの解放( ref this.txInfo[ 1 ] );
\r
55 base.OnManagedリソースの解放();
\r
58 public override int On進行描画()
\r
60 if( !base.b活性化してない )
\r
62 if( base.b初めての進行描画 )
\r
64 this.ctスクロール用 = new CCounter( 0, 6000, 1, CDTXMania.Instance.Timer );
\r
65 base.b初めての進行描画 = false;
\r
67 this.ctスクロール用.t進行();
\r
68 if( this.ctスクロール用.b終了値に達した )
\r
70 this.n画像Index上 = this.n画像Index下;
\r
71 this.n画像Index下 = ( this.n画像Index下 + 1 ) % stInfo.GetLength( 0 ); //8;
\r
72 this.ctスクロール用.n現在の値 = 0;
\r
74 int n現在の値 = this.ctスクロール用.n現在の値;
\r
77 double n現在の割合 = ( (double) n現在の値 ) / 250.0;
\r
78 if( this.n画像Index上 >= 0 )
\r
80 STINFO stinfo = this.stInfo[ this.n画像Index上 ];
\r
81 Rectangle rectangle = new Rectangle(
\r
83 stinfo.pt左上座標.Y + ( (int) ( (int)(45.0 * Scale.Y) * n現在の割合 ) ),
\r
84 (int)(221 * Scale.X),
\r
85 Convert.ToInt32((int)(45.0 * Scale.Y) * (1.0 - n現在の割合))
\r
87 if( this.txInfo[ stinfo.nTexture番号 ] != null )
\r
89 this.txInfo[ stinfo.nTexture番号 ].t2D描画(
\r
90 CDTXMania.Instance.Device,
\r
97 if( this.n画像Index下 >= 0 )
\r
99 STINFO stinfo = this.stInfo[ this.n画像Index下 ];
\r
100 Rectangle rectangle = new Rectangle(
\r
103 (int)(221 * Scale.X),
\r
104 (int) ( 45.0 * Scale.Y * n現在の割合 )
\r
106 if( this.txInfo[ stinfo.nTexture番号 ] != null )
\r
108 this.txInfo[ stinfo.nTexture番号 ].t2D描画(
\r
109 CDTXMania.Instance.Device,
\r
111 6 * Scale.Y + ( (int) ( 45.0 * Scale.Y * ( 1.0 - n現在の割合 ) ) ),
\r
119 STINFO stinfo = this.stInfo[ this.n画像Index下 ];
\r
120 Rectangle rectangle = new Rectangle(
\r
123 (int)(221 * Scale.X),
\r
124 (int)(45 * Scale.Y)
\r
126 if( this.txInfo[ stinfo.nTexture番号 ] != null )
\r
128 this.txInfo[ stinfo.nTexture番号 ].t2D描画(
\r
129 CDTXMania.Instance.Device,
\r
143 #region [ private ]
\r
144 //-----------------
\r
145 [StructLayout( LayoutKind.Sequential )]
\r
146 private struct STINFO
\r
148 public int nTexture番号;
\r
149 public Point pt左上座標;
\r
150 public STINFO( int nTexture番号, int x, int y )
\r
152 this.nTexture番号 = nTexture番号;
\r
153 this.pt左上座標 = new Point( x, y );
\r
157 private CCounter ctスクロール用;
\r
158 private int n画像Index下;
\r
159 private int n画像Index上;
\r
160 private readonly STINFO[] stInfo = new STINFO[] {
\r
161 new STINFO( 0, 0, 0 ),
\r
162 new STINFO( 0, 0, (int)(49 * Scale.Y) ),
\r
163 new STINFO( 0, 0, (int)(97 * Scale.Y) ),
\r
164 new STINFO( 0, 0, (int)(147 * Scale.Y) ),
\r
165 new STINFO( 0, 0, (int)(196 * Scale.Y) ),
\r
166 new STINFO( 1, 0, (int)(0 * Scale.Y) ),
\r
167 new STINFO( 1, 0, (int)(49 * Scale.Y) ),
\r
168 new STINFO( 1, 0, (int)(97 * Scale.Y) ),
\r
169 new STINFO( 1, 0, (int)(147 * Scale.Y) )
\r
171 private CTexture[] txInfo = new CTexture[ 2 ];
\r
172 //-----------------
\r