2 using System.Collections.Generic;
5 using System.Diagnostics;
10 using Rectangle = System.Drawing.Rectangle;
14 internal class CActSelectShowCurrentPosition : CActivity
18 public CActSelectShowCurrentPosition()
25 public override void On活性化()
32 public override void On非活性化()
36 public override void OnManagedリソースの作成()
40 string pathScrollBar = CSkin.Path(@"Graphics\ScreenSelect scrollbar.png");
41 string pathScrollPosition = CSkin.Path(@"Graphics\ScreenSelect scrollbar.png");
42 if (File.Exists(pathScrollBar))
44 this.txScrollBar = TextureFactory.tテクスチャの生成(pathScrollBar, false);
46 if (File.Exists(pathScrollPosition))
48 this.txScrollPosition = TextureFactory.tテクスチャの生成(pathScrollPosition, false);
50 base.OnManagedリソースの作成();
53 public override void OnManagedリソースの解放()
57 TextureFactory.t安全にDisposeする(ref this.txScrollBar);
58 TextureFactory.t安全にDisposeする(ref this.txScrollPosition);
60 base.OnManagedリソースの解放();
63 public override int On進行描画()
65 #region [ スクロールバーの描画 #27648 ]
66 if (this.txScrollBar != null)
68 for (int sy = 0; sy < (int)(336 * Scale.Y); sy += (int)(128 * Scale.Y))
70 int ry = (sy / (int)(128 * Scale.Y));
71 int h = ((ry + 1) * (int)(128 * Scale.Y) > (int)(336 * Scale.Y)) ? (int)(336 * Scale.Y) - ry * (int)(128 * Scale.Y) : (int)(128 * Scale.Y);
72 this.txScrollBar.t2D描画(
73 CDTXMania.Instance.Device,
74 SampleFramework.GameWindowSize.Width - 12 * Scale.X,
77 (int)(ry * 12 * Scale.X),
82 ); // 本当のy座標は88なんだが、なぜか約30のバイアスが掛かる・・・
86 #region [ スクロール地点の描画 (計算はCActSelect曲リストで行う。スクロール位置と選曲項目の同期のため。)#27648 ]
87 if (this.txScrollPosition != null)
89 int py = CDTXMania.Instance.stage選曲.nスクロールバー相対y座標;
90 if (py <= 336 * Scale.Y - 6 - 8 && py >= 0)
92 this.txScrollPosition.t2D描画(
93 CDTXMania.Instance.Device,
94 SampleFramework.GameWindowSize.Width - (12 - 3) * Scale.X,
115 private CTexture txScrollPosition;
116 private CTexture txScrollBar;