// ------------------
 public void DrawBindingGUI(ControlFreak2.SuperTouchZone.MultiFingerTouchConfig config)
 {
     this.touchGestureBindingInsp.Draw(config.binding, config.touchConfig, this.touchZone.rig);
 }
            // -------------------
            public void DrawConfigGUI(ControlFreak2.SuperTouchZone.MultiFingerTouchConfig config)
            {
                //if (!CFGUI.BoldFoldout(this.configTitleContent, ref this.configFoldedOut))
                //	return;

                InspectorUtils.BeginIndentedSection(this.configTitleContent);

                //CFGUI.BeginIndentedVerticalCFEditorStyles.Inst.boldText);

                bool
                    driveOtherControl = config.driveOtherControl;
                //swipeToDrive		= config.swipeToDrive;
                //useSwipeJoystick	= config.useSwipeJoystick;
                TouchControl
                //controlToDrive				= config.controlToDrive;
                    controlToDriveOnRawPress    = config.controlToDriveOnRawPress,
                    controlToDriveOnNormalPress = config.controlToDriveOnNormalPress,
                    controlToDriveOnLongPress   = config.controlToDriveOnLongPress,

                    controlToDriveOnNormalPressSwipe  = config.controlToDriveOnNormalPressSwipe,
                    controlToDriveOnNormalPressSwipeU = config.controlToDriveOnNormalPressSwipeU,
                    controlToDriveOnNormalPressSwipeR = config.controlToDriveOnNormalPressSwipeR,
                    controlToDriveOnNormalPressSwipeD = config.controlToDriveOnNormalPressSwipeD,
                    controlToDriveOnNormalPressSwipeL = config.controlToDriveOnNormalPressSwipeL,

                    controlToDriveOnLongPressSwipe  = config.controlToDriveOnLongPressSwipe,
                    controlToDriveOnLongPressSwipeU = config.controlToDriveOnLongPressSwipeU,
                    controlToDriveOnLongPressSwipeR = config.controlToDriveOnLongPressSwipeR,
                    controlToDriveOnLongPressSwipeD = config.controlToDriveOnLongPressSwipeD,
                    controlToDriveOnLongPressSwipeL = config.controlToDriveOnLongPressSwipeL;


                //InspectorUtils.BeginIndentedSection(GUIContent.none); //this.configTitleContent);

                //CFGUI.BeginIndentedVertical(CFEditorStyles.Inst.transpSunkenBG);



                this.touchGestureConfigInsp.DrawGUI(config.touchConfig);

                EditorGUILayout.Space();

                //useSwipeJoystick = EditorGUILayout.ToggleLeft(new GUIContent("Use Swipe Joystick", "When enabled, this option gives access to virtual joystick controlled by swiping."),
                //	useSwipeJoystick);

                //if (useSwipeJoystick)
                this.swipeJoyConfigInsp.DrawGUI(config.swipeJoyConfig);

                EditorGUILayout.Space();


                driveOtherControl = EditorGUILayout.ToggleLeft(new GUIContent(" Drive other control", "Use this multi-finger touch to drive other touch control, like joystick or even other touch zone!"),
                                                               driveOtherControl, CFEditorStyles.Inst.boldText);

                if (driveOtherControl)
                {
                    CFGUI.BeginIndentedVertical(CFEditorStyles.Inst.transpSunkenBG);

                    //swipeToDrive = EditorGUILayout.ToggleLeft(new GUIContent("Swipe to drive", "Swipe first to drive other control. This option is useful for joysticks, as it allows to detect many static gestures such as tap without activating the joystick."),
                    //	swipeToDrive);


                    controlToDriveOnRawPress = (TouchControl)CFGUI.ObjectField(new GUIContent("On Raw Press", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                               controlToDriveOnRawPress, typeof(TouchControl), 150);

                    if (controlToDriveOnRawPress == null)
                    {
                        controlToDriveOnNormalPress = (TouchControl)CFGUI.ObjectField(new GUIContent("On Normal Press", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                      controlToDriveOnNormalPress, typeof(TouchControl), 150);

                        if (config.touchConfig.detectLongPress)
                        {
                            controlToDriveOnLongPress = (TouchControl)CFGUI.ObjectField(new GUIContent("On Long Press", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                        controlToDriveOnLongPress, typeof(TouchControl), 150);
                        }

                        controlToDriveOnNormalPressSwipe = (TouchControl)CFGUI.ObjectField(new GUIContent("On Swipe in Any dir. (Normal Press)", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                           controlToDriveOnNormalPressSwipe, typeof(TouchControl), 150);

                        if (controlToDriveOnNormalPressSwipe == null)
                        {
                            controlToDriveOnNormalPressSwipeU = (TouchControl)CFGUI.ObjectField(new GUIContent("On Swipe Up (Normal Press)", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                                controlToDriveOnNormalPressSwipeU, typeof(TouchControl), 150);
                            controlToDriveOnNormalPressSwipeR = (TouchControl)CFGUI.ObjectField(new GUIContent("On Swipe Right (Normal Press)", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                                controlToDriveOnNormalPressSwipeR, typeof(TouchControl), 150);
                            controlToDriveOnNormalPressSwipeD = (TouchControl)CFGUI.ObjectField(new GUIContent("On Swipe Down (Normal Press)", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                                controlToDriveOnNormalPressSwipeD, typeof(TouchControl), 150);
                            controlToDriveOnNormalPressSwipeL = (TouchControl)CFGUI.ObjectField(new GUIContent("On Swipe Left (Normal Press)", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                                controlToDriveOnNormalPressSwipeL, typeof(TouchControl), 150);
                        }

                        if (config.touchConfig.detectLongPress)
                        {
                            controlToDriveOnLongPressSwipe = (TouchControl)CFGUI.ObjectField(new GUIContent("On Swipe in Any dir. (Long Press)", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                             controlToDriveOnLongPressSwipe, typeof(TouchControl), 120);

                            if (controlToDriveOnLongPressSwipe == null)
                            {
                                controlToDriveOnLongPressSwipeU = (TouchControl)CFGUI.ObjectField(new GUIContent("On Swipe Up (Long Press)", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                                  controlToDriveOnLongPressSwipeU, typeof(TouchControl), 120);
                                controlToDriveOnLongPressSwipeR = (TouchControl)CFGUI.ObjectField(new GUIContent("On Swipe Right (Long Press)", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                                  controlToDriveOnLongPressSwipeR, typeof(TouchControl), 120);
                                controlToDriveOnLongPressSwipeD = (TouchControl)CFGUI.ObjectField(new GUIContent("On Swipe Down (Long Press)", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                                  controlToDriveOnLongPressSwipeD, typeof(TouchControl), 120);
                                controlToDriveOnLongPressSwipeL = (TouchControl)CFGUI.ObjectField(new GUIContent("On Swipe Left (Long Press)", "Touch Control to drive with this multi-finger touch.\n\nTIP: It's a good idea to enable \'Can\'t be touched directly\' option on driven control."),
                                                                                                  controlToDriveOnLongPressSwipeL, typeof(TouchControl), 120);
                            }
                        }
                    }


                    CFGUI.EndIndentedVertical();
                }


                //EditorGUILayout.Space();


                InspectorUtils.EndIndentedSection();


                // Register Undo...


                if ((driveOtherControl != config.driveOtherControl) ||
                    //(swipeToDrive		!= config.swipeToDrive) ||
                    //(controlToDrive		!= config.controlToDrive) )
                    (controlToDriveOnRawPress != config.controlToDriveOnRawPress) ||
                    (controlToDriveOnNormalPress != config.controlToDriveOnNormalPress) ||
                    (controlToDriveOnLongPress != config.controlToDriveOnLongPress) ||

                    (controlToDriveOnNormalPressSwipe != config.controlToDriveOnNormalPressSwipe) ||
                    (controlToDriveOnNormalPressSwipeU != config.controlToDriveOnNormalPressSwipeU) ||
                    (controlToDriveOnNormalPressSwipeR != config.controlToDriveOnNormalPressSwipeR) ||
                    (controlToDriveOnNormalPressSwipeD != config.controlToDriveOnNormalPressSwipeD) ||
                    (controlToDriveOnNormalPressSwipeL != config.controlToDriveOnNormalPressSwipeL) ||

                    (controlToDriveOnLongPressSwipe != config.controlToDriveOnLongPressSwipe) ||
                    (controlToDriveOnLongPressSwipeU != config.controlToDriveOnLongPressSwipeU) ||
                    (controlToDriveOnLongPressSwipeR != config.controlToDriveOnLongPressSwipeR) ||
                    (controlToDriveOnLongPressSwipeD != config.controlToDriveOnLongPressSwipeD) ||
                    (controlToDriveOnLongPressSwipeL != config.controlToDriveOnLongPressSwipeL)
                    )
                //||    (useSwipeJoystick	!= config.useSwipeJoystick))
                {
                    CFGUI.CreateUndo("Multi-finger touch config mod.", this.touchZone);

                    config.driveOtherControl = driveOtherControl;
                    //config.swipeToDrive			= swipeToDrive;
                    //config.controlToDrive		= controlToDrive;
                    //config.useSwipeJoystick		= useSwipeJoystick;
                    config.controlToDriveOnRawPress    = controlToDriveOnRawPress;
                    config.controlToDriveOnNormalPress = controlToDriveOnNormalPress;
                    config.controlToDriveOnLongPress   = controlToDriveOnLongPress;

                    config.controlToDriveOnNormalPressSwipe  = controlToDriveOnNormalPressSwipe;
                    config.controlToDriveOnNormalPressSwipeU = controlToDriveOnNormalPressSwipeU;
                    config.controlToDriveOnNormalPressSwipeR = controlToDriveOnNormalPressSwipeR;
                    config.controlToDriveOnNormalPressSwipeD = controlToDriveOnNormalPressSwipeD;
                    config.controlToDriveOnNormalPressSwipeL = controlToDriveOnNormalPressSwipeL;

                    config.controlToDriveOnLongPressSwipe  = controlToDriveOnLongPressSwipe;
                    config.controlToDriveOnLongPressSwipeU = controlToDriveOnLongPressSwipeU;
                    config.controlToDriveOnLongPressSwipeR = controlToDriveOnLongPressSwipeR;
                    config.controlToDriveOnLongPressSwipeD = controlToDriveOnLongPressSwipeD;
                    config.controlToDriveOnLongPressSwipeL = controlToDriveOnLongPressSwipeL;

                    CFGUI.EndUndo(this.touchZone);
                }
            }