Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
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;
     }
 }
Ejemplo n.º 3
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();
 }
Ejemplo n.º 4
0
 public FormAddInputs(InputDevice[] inputs)
 {
     InitializeComponent();
     listBoxInputs.DataSource = inputs;
 }