//public static void TestMethod(Controller c, EventArgs e) //{ // SettingsWindow.debugText[3] = "works"; //} //public static int GetControllerIndex(TouchContact contact) //{ // for (int i = 0; i < numControllers; i++) // { // if (ControllerData.controller[i].docked == false) // { // contact.ControllerIndex = i; // } // } //} public static void SetActiveContact(TouchContact contact, int i) { if (ControllerData.controller[i].docked == false) { contact.ControllerIndex = i; contact.Active = true; } else { contact.Active = false; } }
public static void UpdateInjectors(TouchContact contact, EventArgs e) { if (contact.Active) { //contact.ID = numContacts() - 1; injectorList.Add(MakePointerTouchInfo(contact.PosX, contact.PosY, (uint)contact.ControllerIndex)); // (uint)numContacts() - 1 // pick up right controller: contacts[0].ID = 1 contacts[injectorList.Count() - 1].ID = contact.ControllerIndex; //injector = injectorList.ToArray(); } else { injectorList.RemoveAt(injectorList.Count() - 1); // remove last injector in the list //injectorList.RemoveAt(contact.ID); //injectorList.RemoveAt(0); //injectorList.RemoveAt(numActiveContacts()); //injectorList.RemoveAt(contact.ControllerIndex); //int r = contacts.LastIndexOf(contact); //injectorList.RemoveAt(r); //injector = injectorList.ToArray(); } injector = injectorList.ToArray(); }