public void Remove(InputBehavior behavior) { int idx = Behaviors.FindIndex((x) => { return(x.b == behavior); }); if (idx >= 0) { Behaviors.RemoveAt(idx); behaviors_modified(); } }
public void Remove(InputBehaviorSet behaviors) { if (behaviors == null) { return; } foreach (var binfo in behaviors.Behaviors) { int idx = Behaviors.FindIndex((x) => { return(x.b == binfo.b); }); Behaviors.RemoveAt(idx); } behaviors_modified(); }
public List <InputBehavior> RemoveByGroup(string group) { List <InputBehavior> removed = new List <InputBehavior>(); for (int i = 0; i < Behaviors.Count; ++i) { if (Behaviors[i].group == group) { removed.Add(Behaviors[i].b); Behaviors.RemoveAt(i); i--; } } behaviors_modified(); return(removed); }