public void NodeEditor_StartEdit(string content)
 {
     if (IsActive)
     {
         if (!CMInputCallbackInstaller.IsActionMapDisabled(actionMapsDisabled[0]))
         {
             CMInputCallbackInstaller.DisableActionMaps(typeof(NodeEditorController), new[] { typeof(CMInput.INodeEditorActions) });
             CMInputCallbackInstaller.DisableActionMaps(typeof(NodeEditorController), actionMapsDisabled);
         }
     }
     oldInputText     = content;
     oldCaretPosition = nodeEditorInputField.caretPosition;
 }
Example #2
0
    // Now your FPS no longer drops to like 30 or something when spamming keys
    public static bool WillReturnFromFunction(InputAction action)
    {
        if (!inputActionBlockMap.TryGetValue(action, out var blockingActions))
        {
            return(false);
        }

        foreach (var otherAction in blockingActions)
        {
            if (CMInputCallbackInstaller.IsActionMapDisabled(otherAction.GetType()))
            {
                continue;
            }

            if (otherAction.controls.All(x => x.IsPressed() || x.IsActuated()))
            {
                return(true);
            }
        }

        return(false);
    }