public static String GetBindingPoint(InputValueHandle handle) { if (_bindingPoint2Handle.Keys.Contains(handle)) { return(_bindingPoint2Handle[handle]); } return(null); }
internal InputBinding GetBinding(InputValueHandle handle) { if (_usedHandles.Keys.Contains <InputValueHandle>(handle)) { return(_usedHandles[handle]); } return(null); }
internal InputBinding GetBinding(string gameBindingPoint) { InputValueHandle handle = Configuration.GetHandle(gameBindingPoint); if (handle != null) { return(this.GetBinding(handle)); } return(null); }
public static void RegisterBindingPoint(string key, InputValueHandle handle) { // TODO remove handle (if exists) from registered bindings //if (_handle2BindingPoint.ContainsKey(key)) //{ // string k = key; // InputValueHandle h = _handle2BindingPoint[key]; //} _handle2BindingPoint.TryAdd(key, handle); _bindingPoint2Handle.TryAdd(handle, key); }
internal bool RemoveBindingIfExist(InputValueHandle handle) { // remove binding for the handle is some exists if (handle != null && _usedHandles.Keys.Contains <InputValueHandle>(handle)) { InputBinding oldBinding = _usedHandles[handle]; _usedHandles.Remove(handle); oldBinding.destroy(); OnPropertyChanged("Bindings"); return(true); } return(false); }