2 using System.Collections.Generic;
\r
4 using System.Runtime.InteropServices;
\r
5 using System.Drawing;
\r
11 internal class CActConfigKeyAssign : CActivity
\r
15 public bool bキー入力待ちの最中である
\r
19 return this.bキー入力待ち;
\r
26 public void t開始(EKeyConfigPart part, EKeyConfigPad pad, string strパッド名)
\r
28 if (part != EKeyConfigPart.UNKNOWN)
\r
32 this.strパッド名 = strパッド名;
\r
33 for (int i = 0; i < 0x10; i++)
\r
35 this.structReset用KeyAssign[i].入力デバイス = CDTXMania.Instance.ConfigIni.KeyAssign[(int)part][(int)pad][i].入力デバイス;
\r
36 this.structReset用KeyAssign[i].ID = CDTXMania.Instance.ConfigIni.KeyAssign[(int)part][(int)pad][i].ID;
\r
37 this.structReset用KeyAssign[i].コード = CDTXMania.Instance.ConfigIni.KeyAssign[(int)part][(int)pad][i].コード;
\r
42 public void tEnter押下()
\r
46 CDTXMania.Instance.Skin.sound決定音.t再生する();
\r
47 switch (this.n現在の選択行)
\r
50 for (int i = 0; i < 0x10; i++)
\r
52 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][i].入力デバイス = this.structReset用KeyAssign[i].入力デバイス;
\r
53 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][i].ID = this.structReset用KeyAssign[i].ID;
\r
54 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][i].コード = this.structReset用KeyAssign[i].コード;
\r
59 CDTXMania.Instance.stageコンフィグ.tアサイン完了通知();
\r
62 this.bキー入力待ち = true;
\r
69 CDTXMania.Instance.Skin.soundカーソル移動音.t再生する();
\r
70 this.n現在の選択行 = (this.n現在の選択行 + 1) % 0x12;
\r
77 CDTXMania.Instance.Skin.soundカーソル移動音.t再生する();
\r
78 this.n現在の選択行 = ((this.n現在の選択行 - 1) + 0x12) % 0x12;
\r
85 public override void On活性化()
\r
87 this.part = EKeyConfigPart.UNKNOWN;
\r
88 this.pad = EKeyConfigPad.UNKNOWN;
\r
91 this.bキー入力待ち = false;
\r
92 this.structReset用KeyAssign = new CConfigIni.CKeyAssign.STKEYASSIGN[0x10];
\r
95 public override void On非活性化()
\r
99 TextureFactory.tテクスチャの解放(ref this.txカーソル);
\r
100 TextureFactory.tテクスチャの解放(ref this.txHitKeyダイアログ);
\r
104 public override void OnManagedリソースの作成()
\r
106 if (!base.b活性化してない)
\r
108 this.prvFont = new CPrivateFastFont(CSkin.Path(@"Graphics\fonts\mplus-1p-heavy.ttf"), (int)(18 * Scale.Y)); // t項目リストの設定 の前に必要
\r
109 this.txカーソル = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenConfig menu cursor.png"), false);
\r
110 this.txHitKeyダイアログ = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenConfig hit key to assign dialog.png"), false);
\r
111 base.OnManagedリソースの作成();
\r
114 public override void OnManagedリソースの解放()
\r
116 TextureFactory.t安全にDisposeする(ref prvFont);
\r
118 public override int On進行描画()
\r
120 if (!base.b活性化してない)
\r
124 if (CDTXMania.Instance.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Escape))
\r
126 CDTXMania.Instance.Skin.sound取消音.t再生する();
\r
127 this.bキー入力待ち = false;
\r
128 CDTXMania.Instance.Input管理.tポーリング(CDTXMania.Instance.bApplicationActive, false);
\r
130 else if ((this.tキーチェックとアサイン_Keyboard() || this.tキーチェックとアサイン_MidiIn()) || (this.tキーチェックとアサイン_Joypad() || this.tキーチェックとアサイン_Mouse()))
\r
132 this.bキー入力待ち = false;
\r
133 CDTXMania.Instance.Input管理.tポーリング(CDTXMania.Instance.bApplicationActive, false);
\r
136 else if ((CDTXMania.Instance.Input管理.Keyboard.bキーが押された((int)SlimDX.DirectInput.Key.Delete) && (this.n現在の選択行 >= 0)) && (this.n現在の選択行 <= 15))
\r
138 CDTXMania.Instance.Skin.sound決定音.t再生する();
\r
139 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].入力デバイス = E入力デバイス.不明;
\r
140 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].ID = 0;
\r
141 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].コード = 0;
\r
143 if (this.txカーソル != null)
\r
147 int num3 = 0x3e + (num * (this.n現在の選択行 + 1));
\r
148 this.txカーソル.vc拡大縮小倍率 = new Vector3(1f, 0.75f, 1f);
\r
149 this.txカーソル.t2D描画(CDTXMania.Instance.Device, num2 * Scale.X, num3 * Scale.Y - 6, new Rectangle(0, 0, (int)(0x10 * Scale.X), (int)(0x20 * Scale.Y)));
\r
151 Rectangle rectangle = new Rectangle((int)(8 * Scale.X), 0, (int)(0x10 * Scale.X), (int)(0x20 * Scale.Y));
\r
152 for (int j = 0; j < 14; j++)
\r
154 this.txカーソル.t2D描画(CDTXMania.Instance.Device, num2 * Scale.X, num3 * Scale.Y - 6, rectangle);
\r
157 this.txカーソル.t2D描画(CDTXMania.Instance.Device, num2 * Scale.X, num3 * Scale.Y - 6, new Rectangle((int)(0x10 * Scale.X), 0, (int)(0x10 * Scale.X), (int)(0x20 * Scale.Y)));
\r
162 //CDTXMania.Instance.stageコンフィグ.actFont.t文字列描画( x, y, this.strパッド名, false, 0.75f );
\r
163 Bitmap bmpStr = prvFont.DrawPrivateFont(this.strパッド名, Color.White, Color.Black);
\r
164 CTexture txStr = TextureFactory.tテクスチャの生成(bmpStr);
\r
165 txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f);
\r
166 txStr.t2D描画(CDTXMania.Instance.Device, x * Scale.X, y * Scale.Y - 20);
\r
167 TextureFactory.tテクスチャの解放(ref txStr);
\r
168 TextureFactory.t安全にDisposeする(ref txStr);
\r
169 TextureFactory.t安全にDisposeする(ref bmpStr);
\r
172 CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad];
\r
175 for (int i = 0; i < 0x10; i++)
\r
177 switch (stkeyassignArray[i].入力デバイス)
\r
179 case E入力デバイス.キーボード:
\r
180 this.tアサインコードの描画_Keyboard(i + 1, x + 20, y, stkeyassignArray[i].ID, stkeyassignArray[i].コード, this.n現在の選択行 == i);
\r
183 case E入力デバイス.MIDI入力:
\r
184 this.tアサインコードの描画_MidiIn(i + 1, x + 20, y, stkeyassignArray[i].ID, stkeyassignArray[i].コード, this.n現在の選択行 == i);
\r
187 case E入力デバイス.ジョイパッド:
\r
188 this.tアサインコードの描画_Joypad(i + 1, x + 20, y, stkeyassignArray[i].ID, stkeyassignArray[i].コード, this.n現在の選択行 == i);
\r
192 this.tアサインコードの描画_Mouse(i + 1, x + 20, y, stkeyassignArray[i].ID, stkeyassignArray[i].コード, this.n現在の選択行 == i);
\r
196 strParam = string.Format("{0,2}.", i + 1);
\r
197 b強調 = (this.n現在の選択行 == i);
\r
199 prvFont.DrawPrivateFont(strParam, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) :
\r
200 prvFont.DrawPrivateFont(strParam, Color.White, Color.Black);
\r
201 txStr = TextureFactory.tテクスチャの生成(bmpStr, false);
\r
202 txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f);
\r
203 txStr.t2D描画(CDTXMania.Instance.Device, (x + 20) * Scale.X, y * Scale.Y - 20);
\r
204 TextureFactory.tテクスチャの解放(ref txStr);
\r
205 TextureFactory.t安全にDisposeする(ref txStr);
\r
206 TextureFactory.t安全にDisposeする(ref bmpStr);
\r
207 //CDTXMania.Instance.stageコンフィグ.actFont.t文字列描画( x + 20, y, string.Format( "{0,2}.", i + 1 ), this.n現在の選択行 == i, 0.75f );
\r
212 strParam = "Reset";
\r
213 b強調 = (this.n現在の選択行 == 0x10);
\r
215 prvFont.DrawPrivateFont(strParam, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) :
\r
216 prvFont.DrawPrivateFont(strParam, Color.White, Color.Black);
\r
217 txStr = TextureFactory.tテクスチャの生成(bmpStr, false);
\r
218 txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f);
\r
219 txStr.t2D描画(CDTXMania.Instance.Device, (x + 20) * Scale.X, y * Scale.Y - 20);
\r
220 TextureFactory.tテクスチャの解放(ref txStr);
\r
221 TextureFactory.t安全にDisposeする(ref txStr);
\r
222 TextureFactory.t安全にDisposeする(ref bmpStr);
\r
224 strParam = "<< Returnto List";
\r
225 b強調 = (this.n現在の選択行 == 0x11);
\r
227 prvFont.DrawPrivateFont(strParam, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) :
\r
228 prvFont.DrawPrivateFont(strParam, Color.White, Color.Black);
\r
229 txStr = TextureFactory.tテクスチャの生成(bmpStr, false);
\r
230 txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f);
\r
231 txStr.t2D描画(CDTXMania.Instance.Device, (x + 20) * Scale.X, y * Scale.Y - 20);
\r
232 TextureFactory.tテクスチャの解放(ref txStr);
\r
233 TextureFactory.t安全にDisposeする(ref txStr);
\r
234 TextureFactory.t安全にDisposeする(ref bmpStr);
\r
236 //CDTXMania.Instance.stageコンフィグ.actFont.t文字列描画( x + 20, y, "Reset", this.n現在の選択行 == 0x10, 0.75f );
\r
238 //CDTXMania.Instance.stageコンフィグ.actFont.t文字列描画( x + 20, y, "<< Returnto List", this.n現在の選択行 == 0x11, 0.75f );
\r
240 if (this.bキー入力待ち && (this.txHitKeyダイアログ != null))
\r
242 this.txHitKeyダイアログ.t2D描画(CDTXMania.Instance.Device, 0x185 * Scale.X, 0xd7 * Scale.Y);
\r
251 #region [ private ]
\r
252 //-----------------
\r
253 [StructLayout(LayoutKind.Sequential)]
\r
254 private struct STKEYLABEL
\r
257 public string strLabel;
\r
258 public STKEYLABEL(int nCode, string strLabel)
\r
260 this.nCode = nCode;
\r
261 this.strLabel = strLabel;
\r
265 private bool bキー入力待ち;
\r
266 private STKEYLABEL[] KeyLabel = new STKEYLABEL[] {
\r
267 new STKEYLABEL(0x35, "[ESC]"), new STKEYLABEL(1, "[ 1 ]"), new STKEYLABEL(2, "[ 2 ]"), new STKEYLABEL(3, "[ 3 ]"), new STKEYLABEL(4, "[ 4 ]"), new STKEYLABEL(5, "[ 5 ]"), new STKEYLABEL(6, "[ 6 ]"), new STKEYLABEL(7, "[ 7 ]"), new STKEYLABEL(8, "[ 8 ]"), new STKEYLABEL(9, "[ 9 ]"), new STKEYLABEL(0, "[ 0 ]"), new STKEYLABEL(0x53, "[ - ]"), new STKEYLABEL(0x34, "[ = ]"), new STKEYLABEL(0x2a, "[BSC]"), new STKEYLABEL(0x81, "[TAB]"), new STKEYLABEL(0x1a, "[ Q ]"),
\r
268 new STKEYLABEL(0x20, "[ W ]"), new STKEYLABEL(14, "[ E ]"), new STKEYLABEL(0x1b, "[ R ]"), new STKEYLABEL(0x1d, "[ T ]"), new STKEYLABEL(0x22, "[ Y ]"), new STKEYLABEL(30, "[ U ]"), new STKEYLABEL(0x12, "[ I ]"), new STKEYLABEL(0x18, "[ O ]"), new STKEYLABEL(0x19, "[ P ]"), new STKEYLABEL(0x4a, "[ [ ]"), new STKEYLABEL(0x73, "[ ] ]"), new STKEYLABEL(0x75, "[Enter]"), new STKEYLABEL(0x4b, "[L-Ctrl]"), new STKEYLABEL(10, "[ A ]"), new STKEYLABEL(0x1c, "[ S ]"), new STKEYLABEL(13, "[ D ]"),
\r
269 new STKEYLABEL(15, "[ F ]"), new STKEYLABEL(0x10, "[ G ]"), new STKEYLABEL(0x11, "[ H ]"), new STKEYLABEL(0x13, "[ J ]"), new STKEYLABEL(20, "[ K ]"), new STKEYLABEL(0x15, "[ L ]"), new STKEYLABEL(0x7b, "[ ; ]"), new STKEYLABEL(0x26, "[ ' ]"), new STKEYLABEL(0x45, "[ ` ]"), new STKEYLABEL(0x4e, "[L-Shift]"), new STKEYLABEL(0x2b, @"[ \]"), new STKEYLABEL(0x23, "[ Z ]"), new STKEYLABEL(0x21, "[ X ]"), new STKEYLABEL(12, "[ C ]"), new STKEYLABEL(0x1f, "[ V ]"), new STKEYLABEL(11, "[ B ]"),
\r
270 new STKEYLABEL(0x17, "[ N ]"), new STKEYLABEL(0x16, "[ M ]"), new STKEYLABEL(0x2f, "[ , ]"), new STKEYLABEL(0x6f, "[ . ]"), new STKEYLABEL(0x7c, "[ / ]"), new STKEYLABEL(120, "[R-Shift]"), new STKEYLABEL(0x6a, "[ * ]"), new STKEYLABEL(0x4d, "[L-Alt]"), new STKEYLABEL(0x7e, "[Space]"), new STKEYLABEL(0x2d, "[CAPS]"), new STKEYLABEL(0x36, "[F1]"), new STKEYLABEL(0x37, "[F2]"), new STKEYLABEL(0x38, "[F3]"), new STKEYLABEL(0x39, "[F4]"), new STKEYLABEL(0x3a, "[F5]"), new STKEYLABEL(0x3b, "[F6]"),
\r
271 new STKEYLABEL(60, "[F7]"), new STKEYLABEL(0x3d, "[F8]"), new STKEYLABEL(0x3e, "[F9]"), new STKEYLABEL(0x3f, "[F10]"), new STKEYLABEL(0x58, "[NumLock]"), new STKEYLABEL(0x7a, "[Scroll]"), new STKEYLABEL(0x60, "[NPad7]"), new STKEYLABEL(0x61, "[NPad8]"), new STKEYLABEL(0x62, "[NPad9]"), new STKEYLABEL(0x66, "[NPad-]"), new STKEYLABEL(0x5d, "[NPad4]"), new STKEYLABEL(0x5e, "[NPad5]"), new STKEYLABEL(0x5f, "[NPad6]"), new STKEYLABEL(0x68, "[NPad+]"), new STKEYLABEL(90, "[NPad1]"), new STKEYLABEL(0x5b, "[NPad2]"),
\r
272 new STKEYLABEL(0x5c, "[NPad3]"), new STKEYLABEL(0x59, "[NPad0]"), new STKEYLABEL(0x67, "[NPad.]"), new STKEYLABEL(0x40, "[F11]"), new STKEYLABEL(0x41, "[F12]"), new STKEYLABEL(0x42, "[F13]"), new STKEYLABEL(0x43, "[F14]"), new STKEYLABEL(0x44, "[F15]"), new STKEYLABEL(0x48, "[Kana]"), new STKEYLABEL(0x24, "[ ? ]"), new STKEYLABEL(0x30, "[Henkan]"), new STKEYLABEL(0x57, "[MuHenkan]"), new STKEYLABEL(0x8f, @"[ \ ]"), new STKEYLABEL(0x25, "[NPad.]"), new STKEYLABEL(0x65, "[NPad=]"), new STKEYLABEL(0x72, "[ ^ ]"),
\r
273 new STKEYLABEL(40, "[ @ ]"), new STKEYLABEL(0x2e, "[ : ]"), new STKEYLABEL(130, "[ _ ]"), new STKEYLABEL(0x49, "[Kanji]"), new STKEYLABEL(0x7f, "[Stop]"), new STKEYLABEL(0x29, "[AX]"), new STKEYLABEL(100, "[NPEnter]"), new STKEYLABEL(0x74, "[R-Ctrl]"), new STKEYLABEL(0x54, "[Mute]"), new STKEYLABEL(0x2c, "[Calc]"), new STKEYLABEL(0x70, "[PlayPause]"), new STKEYLABEL(0x52, "[MediaStop]"), new STKEYLABEL(0x85, "[Volume-]"), new STKEYLABEL(0x86, "[Volume+]"), new STKEYLABEL(0x8b, "[WebHome]"), new STKEYLABEL(0x63, "[NPad,]"),
\r
274 new STKEYLABEL(0x69, "[ / ]"), new STKEYLABEL(0x80, "[PrtScn]"), new STKEYLABEL(0x77, "[R-Alt]"), new STKEYLABEL(110, "[Pause]"), new STKEYLABEL(70, "[Home]"), new STKEYLABEL(0x84, "[Up]"), new STKEYLABEL(0x6d, "[PageUp]"), new STKEYLABEL(0x4c, "[Left]"), new STKEYLABEL(0x76, "[Right]"), new STKEYLABEL(0x33, "[End]"), new STKEYLABEL(50, "[Down]"), new STKEYLABEL(0x6c, "[PageDown]"), new STKEYLABEL(0x47, "[Insert]"), new STKEYLABEL(0x31, "[Delete]"), new STKEYLABEL(0x4f, "[L-Win]"), new STKEYLABEL(0x79, "[R-Win]"),
\r
275 new STKEYLABEL(0x27, "[APP]"), new STKEYLABEL(0x71, "[Power]"), new STKEYLABEL(0x7d, "[Sleep]"), new STKEYLABEL(0x87, "[Wake]")
\r
277 private int n現在の選択行;
\r
278 private EKeyConfigPad pad;
\r
279 private EKeyConfigPart part;
\r
280 private CConfigIni.CKeyAssign.STKEYASSIGN[] structReset用KeyAssign;
\r
281 private string strパッド名;
\r
282 private CTexture txHitKeyダイアログ;
\r
283 private CTexture txカーソル;
\r
284 private CPrivateFastFont prvFont;
\r
286 private void tアサインコードの描画_Joypad(int line, int x, int y, int nID, int nCode, bool b強調)
\r
316 if ((6 <= nCode) && (nCode < 6 + 128)) // other buttons (128 types)
\r
318 str = string.Format("Button{0}", nCode - 5);
\r
320 else if ((6 + 128 <= nCode) && (nCode < 6 + 128 + 8)) // POV HAT ( 8 types; 45 degrees per HATs)
\r
322 str = string.Format("POV {0}", (nCode - 6 - 128) * 45);
\r
326 str = string.Format("Code{0}", nCode);
\r
330 Bitmap bmpStr = b強調 ?
\r
331 prvFont.DrawPrivateFont(str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) :
\r
332 prvFont.DrawPrivateFont(str, Color.White, Color.Black);
\r
333 CTexture txStr = TextureFactory.tテクスチャの生成(bmpStr, false);
\r
334 txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f);
\r
335 txStr.t2D描画(CDTXMania.Instance.Device, x * Scale.X, y * Scale.Y - 20);
\r
336 TextureFactory.tテクスチャの解放(ref txStr);
\r
337 TextureFactory.t安全にDisposeする(ref txStr);
\r
338 TextureFactory.t安全にDisposeする(ref bmpStr);
\r
339 // CDTXMania.Instance.stageコンフィグ.actFont.t文字列描画( x, y, string.Format( "{0,2}. Joypad #{1} ", line, nID ) + str, b強調, 0.75f );
\r
341 private void tアサインコードの描画_Keyboard(int line, int x, int y, int nID, int nCode, bool b強調)
\r
344 foreach (STKEYLABEL stkeylabel in this.KeyLabel)
\r
346 if (stkeylabel.nCode == nCode)
\r
348 str = string.Format("{0,2}. Key {1}", line, stkeylabel.strLabel);
\r
354 str = string.Format("{0,2}. Key 0x{1:X2}", line, nCode);
\r
357 Bitmap bmpStr = b強調 ?
\r
358 prvFont.DrawPrivateFont(str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) :
\r
359 prvFont.DrawPrivateFont(str, Color.White, Color.Black);
\r
360 CTexture txStr = TextureFactory.tテクスチャの生成(bmpStr, false);
\r
361 txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f);
\r
362 txStr.t2D描画(CDTXMania.Instance.Device, x * Scale.X, y * Scale.Y - 20);
\r
363 TextureFactory.tテクスチャの解放(ref txStr);
\r
364 TextureFactory.t安全にDisposeする(ref txStr);
\r
365 TextureFactory.t安全にDisposeする(ref bmpStr);
\r
366 //CDTXMania.Instance.stageコンフィグ.actFont.t文字列描画( x, y, str, b強調, 0.75f );
\r
368 private void tアサインコードの描画_MidiIn(int line, int x, int y, int nID, int nCode, bool b強調)
\r
370 string str = string.Format("{0,2}. MidiIn #{1} code.{2}", line, nID, nCode);
\r
371 Bitmap bmpStr = b強調 ?
\r
372 prvFont.DrawPrivateFont(str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) :
\r
373 prvFont.DrawPrivateFont(str, Color.White, Color.Black);
\r
374 CTexture txStr = TextureFactory.tテクスチャの生成(bmpStr, false);
\r
375 txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f);
\r
376 txStr.t2D描画(CDTXMania.Instance.Device, x * Scale.X, y * Scale.Y - 20);
\r
377 TextureFactory.tテクスチャの解放(ref txStr);
\r
378 TextureFactory.t安全にDisposeする(ref txStr);
\r
379 TextureFactory.t安全にDisposeする(ref bmpStr);
\r
380 //CDTXMania.Instance.stageコンフィグ.actFont.t文字列描画( x, y, string.Format( "{0,2}. MidiIn #{1} code.{2}", line, nID, nCode ), b強調, 0.75f );
\r
382 private void tアサインコードの描画_Mouse(int line, int x, int y, int nID, int nCode, bool b強調)
\r
384 string str = string.Format("{0,2}. Mouse Button{1}", line, nCode);
\r
385 Bitmap bmpStr = b強調 ?
\r
386 prvFont.DrawPrivateFont(str, Color.White, Color.Black, Color.Yellow, Color.OrangeRed) :
\r
387 prvFont.DrawPrivateFont(str, Color.White, Color.Black);
\r
388 CTexture txStr = TextureFactory.tテクスチャの生成(bmpStr, false);
\r
389 txStr.vc拡大縮小倍率 = new Vector3(0.75f, 0.75f, 1f);
\r
390 txStr.t2D描画(CDTXMania.Instance.Device, x * Scale.X, y * Scale.Y - 20);
\r
391 TextureFactory.tテクスチャの解放(ref txStr);
\r
392 TextureFactory.t安全にDisposeする(ref txStr);
\r
393 TextureFactory.t安全にDisposeする(ref bmpStr);
\r
394 //CDTXMania.Instance.stageコンフィグ.actFont.t文字列描画( x, y, string.Format( "{0,2}. Mouse Button{1}", line, nCode ), b強調, 0.75f );
\r
396 private bool tキーチェックとアサイン_Joypad()
\r
398 foreach (IInputDevice device in CDTXMania.Instance.Input管理.list入力デバイス)
\r
400 if (device.e入力デバイス種別 == E入力デバイス種別.Joystick)
\r
402 for (int i = 0; i < 6 + 0x80 + 8; i++) // +6 for Axis, +8 for HAT
\r
404 if (device.bキーが押された(i))
\r
406 CDTXMania.Instance.Skin.sound決定音.t再生する();
\r
407 CDTXMania.Instance.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する(E入力デバイス.ジョイパッド, device.ID, i);
\r
408 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].入力デバイス = E入力デバイス.ジョイパッド;
\r
409 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].ID = device.ID;
\r
410 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].コード = i;
\r
418 private bool tキーチェックとアサイン_Keyboard()
\r
420 for (int i = 0; i < 0x100; i++)
\r
422 if (i != (int)SlimDX.DirectInput.Key.Escape &&
\r
423 i != (int)SlimDX.DirectInput.Key.UpArrow &&
\r
424 i != (int)SlimDX.DirectInput.Key.DownArrow &&
\r
425 i != (int)SlimDX.DirectInput.Key.LeftArrow &&
\r
426 i != (int)SlimDX.DirectInput.Key.RightArrow &&
\r
427 i != (int)SlimDX.DirectInput.Key.Delete &&
\r
428 CDTXMania.Instance.Input管理.Keyboard.bキーが押された(i))
\r
430 CDTXMania.Instance.Skin.sound決定音.t再生する();
\r
431 CDTXMania.Instance.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する(E入力デバイス.キーボード, 0, i);
\r
432 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].入力デバイス = E入力デバイス.キーボード;
\r
433 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].ID = 0;
\r
434 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].コード = i;
\r
440 private bool tキーチェックとアサイン_MidiIn()
\r
442 foreach (IInputDevice device in CDTXMania.Instance.Input管理.list入力デバイス)
\r
444 if (device.e入力デバイス種別 == E入力デバイス種別.MidiIn)
\r
446 for (int i = 0; i < 0x100; i++)
\r
448 if (device.bキーが押された(i))
\r
450 CDTXMania.Instance.Skin.sound決定音.t再生する();
\r
451 CDTXMania.Instance.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する(E入力デバイス.MIDI入力, device.ID, i);
\r
452 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].入力デバイス = E入力デバイス.MIDI入力;
\r
453 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].ID = device.ID;
\r
454 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].コード = i;
\r
462 private bool tキーチェックとアサイン_Mouse()
\r
464 for (int i = 0; i < 8; i++)
\r
466 if (CDTXMania.Instance.Input管理.Mouse.bキーが押された(i))
\r
468 CDTXMania.Instance.ConfigIni.t指定した入力が既にアサイン済みである場合はそれを全削除する(E入力デバイス.マウス, 0, i);
\r
469 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].入力デバイス = E入力デバイス.マウス;
\r
470 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].ID = 0;
\r
471 CDTXMania.Instance.ConfigIni.KeyAssign[(int)this.part][(int)this.pad][this.n現在の選択行].コード = i;
\r
476 //-----------------
\r