示例#1
0
        void DeviceAdded(InputLibWrapper.Device rawdev)
        {
            Device dev = new Device(rawdev);

            devices.Add(dev);
            GainedDevice(dev);
        }
示例#2
0
 void DeviceRemoved(InputLibWrapper.Device rawdev)
 {
     for (int i = devices.Count; i-- > 0;)
     {
         if (devices[i].rawDevice == rawdev)
         {
             LostDevice(devices[i]);
             devices.RemoveAt(i);
             break;
         }
     }
 }
示例#3
0
 void WindowGUI(int windowID)
 {
     dev = InputLib.devices[devidx];
     AI_Database.DeviceNames.TryGetValue(dev.name, out devNames);
     InputLib.CheckInput();
     if (GUILayout.Button(dev.name))
     {
         if (++devidx >= InputLib.devices.Count)
         {
             devidx = 0;
         }
     }
     GUILayout.BeginHorizontal();
     DumpAxes();
     DumpButtons();
     GUILayout.EndHorizontal();
     GUI.DragWindow(new Rect(0, 0, 10000, 20));
 }