Ejemplo n.º 1
0
 private void ProcessKeyString(ref KeyCode key, ref bool isEditing)
 {
     if (isEditing && Event.current.type == EventType.KeyUp)
     {
         key = AxisConfiguration.StringToKey(_keyString);
         if (key == KeyCode.None)
         {
             _keyString = string.Empty;
         }
         else
         {
             _keyString = key.ToString();
         }
         isEditing = false;
     }
 }
Ejemplo n.º 2
0
 private void ProcessKeyString(ref bool isEditing, SerializedProperty key)
 {
     if (isEditing && Event.current.type == EventType.KeyUp)
     {
         KeyCode keyCode = AxisConfiguration.StringToKey(_keyString);
         if (keyCode == KeyCode.None)
         {
             key.enumValueIndex = 0;
             _keyString         = string.Empty;
         }
         else
         {
             key.enumValueIndex = IndexOfKeyName(key.enumNames, _keyString);
             _keyString         = keyCode.ToString();
         }
     }
 }
Ejemplo n.º 3
0
 private KeyCode PropertyToKeyCode(SerializedProperty key)
 {
     return(AxisConfiguration.StringToKey(key.enumNames[key.enumValueIndex]));
 }