void DeviceAdded(InputLibWrapper.Device rawdev) { Device dev = new Device(rawdev); devices.Add(dev); GainedDevice(dev); }
void DeviceRemoved(InputLibWrapper.Device rawdev) { for (int i = devices.Count; i-- > 0;) { if (devices[i].rawDevice == rawdev) { LostDevice(devices[i]); devices.RemoveAt(i); break; } } }
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)); }