Example #1
0
 public static String GetBindingPoint(InputValueHandle handle)
 {
     if (_bindingPoint2Handle.Keys.Contains(handle))
     {
         return(_bindingPoint2Handle[handle]);
     }
     return(null);
 }
Example #2
0
 internal InputBinding GetBinding(InputValueHandle handle)
 {
     if (_usedHandles.Keys.Contains <InputValueHandle>(handle))
     {
         return(_usedHandles[handle]);
     }
     return(null);
 }
Example #3
0
        internal InputBinding GetBinding(string gameBindingPoint)
        {
            InputValueHandle handle = Configuration.GetHandle(gameBindingPoint);

            if (handle != null)
            {
                return(this.GetBinding(handle));
            }
            return(null);
        }
Example #4
0
        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);
        }
Example #5
0
 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);
 }