public static int GetInputIndex(InputDevice i) { if (i.GetType() == typeof(InputBalanceBoard)) { return 0; } else if (i.GetType() == typeof(InputRemoteIR)) { return 1; } else if (i.GetType() == typeof(InputRemoteRollPitch)) { return 2; } else if (i.GetType() == typeof(InputNunchuckJoystick)) { return 3; } else if (i.GetType() == typeof(InputNunchuckRollPitch)) { return 4; } else if (i.GetType() == typeof(InputMouse)) { return 5; } else { return 0; } }
public static int GetInputIndex(InputDevice i) { if (i.GetType() == typeof(InputRemote)) { return 0; } else if (i.GetType() == typeof(InputNunchuck)) { return 1; } else { return 0; } }
public static InputDevice[] GetUnusedInputs(InputDevice primary, List<InputDevice> additionalInputs) { List<InputDevice> unused = new List<InputDevice>(); List<InputDevice> possible = new List<InputDevice>(Input2D.GetPossibleInputs()); possible.AddRange(Input3D.GetPossibleInputs()); foreach (InputDevice id in possible) { if (id.GetType() != primary.GetType()) { bool found = false; foreach (InputDevice addId in additionalInputs) { if (id.GetType() == addId.GetType()) { found = true; } } if (found == false) { unused.Add(id); } } } return unused.ToArray(); }
public FormAddInputs(InputDevice[] inputs) { InitializeComponent(); listBoxInputs.DataSource = inputs; }