2 using System.Collections.Generic;
\r
4 using System.Drawing;
\r
5 using System.Diagnostics;
\r
9 using Color = System.Drawing.Color;
\r
10 using Rectangle = System.Drawing.Rectangle;
\r
14 internal class CAct演奏パネル文字列 : CActivity
\r
16 public CAct演奏パネル文字列()
\r
18 base.b活性化してない = true;
\r
22 public void SetPanelString(string str)
\r
26 TextureFactory.tテクスチャの解放(ref this.txPanel);
\r
28 if (!string.IsNullOrEmpty(str))
\r
30 using (FontFamily ff = new FontFamily("MS PGothic"))
\r
32 using (CPrivateFont cpf = new CPrivateFont(ff, 24))
\r
34 using (Bitmap bmp = cpf.DrawPrivateFont(str, Color.White, Color.DarkGray))
\r
36 this.txPanel = TextureFactory.tテクスチャの生成(bmp);
\r
55 public override void On活性化()
\r
57 this.txPanel = null;
\r
62 public override void On非活性化()
\r
64 TextureFactory.tテクスチャの解放(ref this.txPanel);
\r
68 public override void OnManagedリソースの作成()
\r
72 base.OnManagedリソースの作成();
\r
76 public override void OnManagedリソースの解放()
\r
80 TextureFactory.tテクスチャの解放(ref this.txPanel);
\r
81 base.OnManagedリソースの解放();
\r
85 public override int On進行描画()
\r
87 if (b活性化してる && !this.bMute)
\r
89 int x = CDTXMania.Instance.Coordinates.Panel.X;
\r
90 int y = CDTXMania.Instance.Coordinates.Panel.Y;
\r
91 if (this.txPanel != null)
\r
93 Rectangle rectangle = new Rectangle(0, 0, txPanel.sz画像サイズ.Width, txPanel.sz画像サイズ.Height);
\r
94 txPanel.fZ軸中心回転 = (float)(Math.PI / 2);
\r
95 this.txPanel.t2D描画(CDTXMania.Instance.Device, x - rectangle.Width / 2 - rectangle.Height / 2, y + rectangle.Width / 2 - rectangle.Height / 2, rectangle);
\r
102 private CTexture txPanel;
\r
103 private bool bMute;
\r