// -------------------- static public TouchControlPanel CreatePanel( InputRig rig, Canvas canvas, string name, Rect rect, string undoName = null) { TouchControlPanel panel = (TouchControlPanel)CreateStretchyRectTr(typeof(TouchControlPanel), rig.transform, name, rect, 0); // Add default Unity UI add-on... panel.gameObject.AddComponent <TouchControlPanelUnityUiAddOn>(); // Setup hierarchy... panel.transform.SetParent(canvas.transform, false); panel.InvalidateHierarchy(); if (undoName != null) { Undo.RegisterCreatedObjectUndo(panel.gameObject, undoName); } return(panel); }
//abstract protected GUIContent GetTitle(); // -------------------- public void Init(TouchControlPanel panel, System.Action onCreationCallback) { this.panel = panel; this.onCreationCallback = onCreationCallback; this.emulateTouchPressure = true; this.canvas = (Canvas)CFUtils.GetComponentHereOrInParent(this.panel, typeof(Canvas)); this.controlName = "NewControl"; this.dynamicMode = ControlMode.Static; this.regionRect = RegionRectPreset.LeftHalf; this.controlShape = TouchControl.Shape.Circle; this.staticAnchor = ControlAnchorPoint.BottomRight; this.controlSize = 0.15f; this.controlDepth = Mathf.Lerp(DEPTH_MIN, DEPTH_MAX, 0.25f); this.regionDepth = Mathf.Lerp(DEPTH_MIN, DEPTH_MAX, 0.70f); // Restore params... if (mStoredParamsSaved) { this.controlSize = mStoredControlSize; this.staticAnchor = mStoredStaticAnchor; this.controlDepth = mStoredControlDepth; this.regionDepth = mStoredRegionDepth; this.controlShape = mStoredControlShape; } }
// ------------------ protected void Init(TouchControlPanel panel, BindingSetup bindingSetup, System.Action onCreationCallback) { base.Init(panel, onCreationCallback); if (bindingSetup != null) { bindingSetup.Apply(this); } this.controlName = TouchControlWizardUtils.GetUniqueButtonName(panel.rig); this.defaultControlName = this.controlName; string uniqueNameSuffix = ""; if ((bindingSetup != null) && !string.IsNullOrEmpty(bindingSetup.pressAxis)) { uniqueNameSuffix = bindingSetup.pressAxis; } else if ((bindingSetup != null) && !string.IsNullOrEmpty(bindingSetup.toggleAxis)) { uniqueNameSuffix = bindingSetup.toggleAxis; } if (!string.IsNullOrEmpty(uniqueNameSuffix)) { this.controlName = (uniqueNameSuffix + "-Button"); } this.defaultSprite = TouchControlWizardUtils.GetDefaultButtonSprite(uniqueNameSuffix); }
// ---------------- static public void ShowWizard(TouchControlPanel panel, System.Action onCreationCallback = null) { TouchSplitterCreationWizard w = (TouchSplitterCreationWizard)EditorWindow.GetWindow(typeof(TouchSplitterCreationWizard), true, "CF2 Touch Splitter Wizard"); if (w != null) { w.InitWizard(panel, onCreationCallback); w.ShowPopup(); } }
// ---------------- static public void ShowWizard(TouchControlPanel panel, TouchJoystickCreationWizard.BindingSetup bindingSetup = null, System.Action onCreationCallback = null) { TouchJoystickCreationWizard w = (TouchJoystickCreationWizard)EditorWindow.GetWindow(typeof(TouchJoystickCreationWizard), true, "CF2 Joystick Wizard"); if (w != null) { w.Init(panel, bindingSetup, onCreationCallback); w.ShowPopup(); } }
// ------------------ static public TouchControlPanel GetRigPanel(InputRig rig) { if (rig == null) { return(null); } TouchControlPanel panel = rig.GetComponentInChildren <TouchControlPanel>(); return(panel); }
// ------------------ protected void InitWizard(TouchControlPanel panel, System.Action onCreationCallback) { base.Init(panel, onCreationCallback); this.controlName = TouchControlWizardUtils.GetUniqueTouchSplitterName(this.panel.rig); this.defaultControlName = this.controlName; this.controlDepth = 60; this.regionDepth = 60; this.positionMode = NonDynamicControlWizardBase.PositionMode.ConstantSize; }
// ----------------- static public TouchControl CreateStretchyControl( System.Type controlType, TouchControlPanel panel, Transform root, string name, Rect regionRect, float localDepth) { TouchControl c = (TouchControl)CreateStretchyRectTr(controlType, panel.transform, name, regionRect, localDepth); c.InvalidateHierarchy(); return(c); }
// --------------- public override void OnInspectorGUI() { TouchControlPanel panel = (TouchControlPanel)this.target; GUILayout.Box(GUIContent.none, CFEditorStyles.Inst.headerTouchPanel, GUILayout.ExpandWidth(true)); if (panel.rig == null) { InspectorUtils.DrawErrorBox("This panel is not connected to a Input Rig!"); } if (GUILayout.Button("Add Button")) { TouchButtonCreationWizard.ShowWizard(panel); } if (GUILayout.Button("Add Joystick")) { TouchJoystickCreationWizard.ShowWizard(panel); } if (GUILayout.Button("Add Steering Wheel")) { TouchWheelCreationWizard.ShowWizard(panel); } if (GUILayout.Button("Add Trackpad")) { TouchTrackPadCreationWizard.ShowWizard(panel); } if (GUILayout.Button("Add Touch Zone")) { SuperTouchZoneCreationWizard.ShowWizard(panel); } if (GUILayout.Button("Add Touch Splitter")) { TouchSplitterCreationWizard.ShowWizard(panel); } // Settings GUI... }
// --------------------- static public void AddToMenu( GenericMenu menu, string itemLabel, TouchControlPanel panel, System.Type wizardType, object bindingSetup, System.Action onCreationCallback = null) { WizardMenuItem o = new WizardMenuItem(); o.wizardType = wizardType; o.panel = panel; o.callback = onCreationCallback; o.bindingSetup = bindingSetup; menu.AddItem(new GUIContent(itemLabel), false, o.Execute); }
// ------------------ protected void Init(TouchControlPanel panel, BindingSetup bindingSetup, System.Action onCreationCallback) { base.Init(panel, onCreationCallback); this.positionMode = NonDynamicControlWizardBase.PositionMode.Stretch; this.controlName = TouchControlWizardUtils.GetUniqueTouchZoneName(panel.rig); this.defaultControlName = this.controlName; this.defaultSprite = TouchControlWizardUtils.GetDefaultSuperTouchZoneSprite(); this.controlShape = TouchControl.Shape.Rectangle; if (bindingSetup != null) { bindingSetup.Apply(this); } }
// ------------------ protected void Init(TouchControlPanel panel, BindingSetup bindignSetup, System.Action onCreationCallback) { base.Init(panel, onCreationCallback); this.controlName = TouchControlWizardUtils.GetUniqueTrackPadName(this.panel.rig); this.defaultControlName = this.controlName; this.defaultSprite = TouchControlWizardUtils.GetDefaultTrackPadSprite(); this.controlShape = TouchControl.Shape.Rectangle; this.positionMode = PositionMode.Stretch; this.regionRect = RegionRectPreset.RightHalf; if (bindignSetup != null) { bindignSetup.Apply(this); } }
// ------------------ protected void Init(TouchControlPanel panel, BindingSetup bindingSetup, System.Action onCreationCallback) { base.Init(panel, onCreationCallback); this.controlName = TouchControlWizardUtils.GetUniqueWheelName(this.panel.rig); this.defaultControlName = this.controlName; this.dynamicMode = ControlMode.DynamicWithRegion; this.regionRect = RegionRectPreset.LeftHalf; this.defaultSprite = TouchControlWizardUtils.GetDefaultWheelSprite(); if (bindingSetup != null) { bindingSetup.Apply(this); } }
// ----------------- static public TouchControl CreateStaticControl( System.Type controlType, TouchControlPanel panel, Transform root, string name, Vector2 anchorPos, Vector2 offset, float size, float localDepth) { TouchControl c = (TouchControl)CreateConstSizeRectTr(controlType, panel.transform, name, anchorPos, offset, Vector2.one * size, localDepth); c.InvalidateHierarchy(); return(c); }
// -------------------- static public TouchControlPanel CreatePanelOnCanvas( InputRig rig, string namePrefix, string undoName = null) { if (rig == null) { return(null); } Canvas canvas = CreateCanvas(rig, namePrefix + "Canvas"); TouchControlPanel panel = CreatePanel(rig, canvas, namePrefix + "Panel", new Rect(0, 0, 1, 1)); if (undoName != null) { Undo.RegisterCreatedObjectUndo(canvas.gameObject, undoName); } return(panel); }
// ------------------ public void Init(TouchControlPanel panel, TouchJoystickCreationWizard.BindingSetup bindingSetup, System.Action onCreationCallback) { base.Init(panel, onCreationCallback); this.controlName = //(((bindingSetup != null) && !string.IsNullOrEmpty(bindingSetup.joyName)) ? ("Joystick-" + bindingSetup.joyName) : TouchControlWizardUtils.GetUniqueJoystickName(panel.rig); this.defaultControlName = this.controlName; this.dynamicMode = ControlMode.DynamicWithRegion; this.regionRect = RegionRectPreset.LeftHalf; this.hatScale = 0.75f; this.defaultSprite = TouchControlWizardUtils.GetDefaultDpadSprite(); this.hatSprite = TouchControlWizardUtils.GetDefaultAnalogJoyHatSprite(); this.baseSprite = TouchControlWizardUtils.GetDefaultAnalogJoyBaseSprite(); if (bindingSetup != null) { bindingSetup.Apply(this); } }
// ---------------------- static public DynamicTouchControl CreateDynamicControlWithRegion( System.Type controlType, TouchControlPanel panel, string name, float size, //Sprite sprite, Rect regionRect, float regionDepth, float controlDepth) { DynamicRegion region = (DynamicRegion)CreateStretchyRectTr(typeof(DynamicRegion), panel.transform, name + "-Region", regionRect, regionDepth); region.InvalidateHierarchy(); DynamicTouchControl c = (DynamicTouchControl)CreateConstSizeRectTr(controlType, region.transform, name, new Vector2(0.5f, 0.5f), Vector2.zero, Vector2.one * size, (controlDepth - regionDepth)); c.InvalidateHierarchy(); c.SetTargetDynamicRegion(region); region.SetTargetControl(c); return(c); }
// ------------------------ static public void CreateContextMenuForAxisBinding(Object panelOrRig, string axisName, /*InputRig.InputSource sourceType, */ System.Action onRefreshCallback = null) { InputRig rig = (panelOrRig as InputRig); TouchControlPanel panel = (panelOrRig as TouchControlPanel); //bool displayPanelName = false; if (panel != null) { rig = panel.rig; } else if (rig != null) { // Auto Select panel... panel = TouchControlWizardUtils.GetRigPanel(rig); //displayPanelName = true; } else { return; } List <TouchControl> controlList = rig.GetTouchControls(); GenericMenu menu = new GenericMenu(); string commandName = ("\"" + axisName + "\" axis "); menu.AddDisabledItem(new GUIContent("Actions for : " + commandName)); menu.AddSeparator(""); InputRig.AxisConfig axisConfig = rig.GetAxisConfig(axisName); if (axisConfig == null) { AxisCreationMenuItem.AddAllMenuItems(menu, axisName, "", rig, onRefreshCallback); } else { int axisSourceTypeMask = axisConfig.GetSupportedInputSourceMask(); BindingDescription.BindingType bindingTypeMask = BindingDescription.BindingType.Axis | BindingDescription.BindingType.Digital; UniversalBindingAssignment.AddBindingContainerToMenu(menu, rig, onRefreshCallback, bindingTypeMask, commandName, "Bind to Input Rig/", rig, KeyCode.None, axisName, axisSourceTypeMask); //, true); //, null); menu.AddSeparator(""); if (panel == null) { menu.AddDisabledItem(new GUIContent("Add a Touch Control Panel to this rig to create and bind commands to Touch Controls!")); } else { UniversalBindingAssignment.AddControlListBindingsToMenu(menu, controlList, onRefreshCallback, bindingTypeMask, commandName, "Bind to Touch Controls/", KeyCode.None, axisName); //, true); //, null); menu.AddSeparator(""); AddTouchControlCreationItemsToMenuForAxisOrKey(menu, panel, axisName, KeyCode.None, onRefreshCallback); } } menu.ShowAsContext(); }
// ------------------------ static public void CreateContextMenuForMousePositionBinding(Object panelOrRig, System.Action onRefreshCallback = null) { InputRig rig = (panelOrRig as InputRig); TouchControlPanel panel = (panelOrRig as TouchControlPanel); //bool displayPanelName = false; if (panel != null) { rig = panel.rig; } else if (rig != null) { // Auto Select panel... panel = TouchControlWizardUtils.GetRigPanel(rig); //displayPanelName = true; } else { return; } List <TouchControl> controlList = rig.GetTouchControls(); GenericMenu menu = new GenericMenu(); string commandName = ("Mouse Position "); menu.AddDisabledItem(new GUIContent("Actions for : " + commandName)); menu.AddSeparator(""); UniversalBindingAssignment.AddBindingContainerToMenu(menu, rig, onRefreshCallback, BindingDescription.BindingType.MousePos, commandName, "Bind to Input Rig/", rig); menu.AddSeparator(""); if (panel == null) { menu.AddDisabledItem(new GUIContent("Add a Touch Control Panel to this rig to create and bind commands to Touch Controls!")); } else { UniversalBindingAssignment.AddControlListBindingsToMenu(menu, controlList, onRefreshCallback, BindingDescription.BindingType.MousePos, commandName, "Bind to Touch Controls/"); menu.AddSeparator(""); int mouseTargetMaxId = CFUtils.GetEnumMaxValue(typeof(SuperTouchZoneCreationWizard.BindingSetup.MouseBindingTarget)); for (int i = 1; i <= 2; ++i) { for (int j = 1; j <= mouseTargetMaxId; ++j) { SuperTouchZoneCreationWizard.BindingSetup.MouseBindingTarget mouseTarget = (SuperTouchZoneCreationWizard.BindingSetup.MouseBindingTarget)j; WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [" + ((i == 1) ? "Single-finger" : "Two-finger") + mouseTarget.ToString() + "]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.MousePos(i, mouseTarget), onRefreshCallback); } } menu.AddSeparator("Create a Super Touch Zone/"); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone...", panel, typeof(SuperTouchZoneCreationWizard), null, onRefreshCallback); } menu.ShowAsContext(); }
// ------------------------ static public void CreateContextMenuForEmuTouchBinding(Object panelOrRig, System.Action onRefreshCallback = null) { InputRig rig = (panelOrRig as InputRig); TouchControlPanel panel = (panelOrRig as TouchControlPanel); //bool displayPanelName = false; if (panel != null) { rig = panel.rig; } else if (rig != null) { // Auto Select panel... panel = TouchControlWizardUtils.GetRigPanel(rig); //displayPanelName = true; } else { return; } List <TouchControl> controlList = rig.GetTouchControls(); GenericMenu menu = new GenericMenu(); string commandName = ("Emuulated Touch "); menu.AddDisabledItem(new GUIContent("Actions for : " + commandName)); menu.AddSeparator(""); UniversalBindingAssignment.AddBindingContainerToMenu(menu, rig, onRefreshCallback, BindingDescription.BindingType.EmuTouch, commandName, "Bind to Input Rig/", rig); menu.AddSeparator(""); if (panel == null) { menu.AddDisabledItem(new GUIContent("Add a Touch Control Panel to this rig to create and bind commands to Touch Controls!")); } else { UniversalBindingAssignment.AddControlListBindingsToMenu(menu, controlList, onRefreshCallback, BindingDescription.BindingType.EmuTouch, commandName, "Bind to Touch Controls/"); menu.AddSeparator(""); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Single-finger Touch]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.EmuTouch(1), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Two-finger Touch]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.EmuTouch(2), onRefreshCallback); menu.AddSeparator("Create a Super Touch Zone/"); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone...", panel, typeof(SuperTouchZoneCreationWizard), null, onRefreshCallback); } menu.ShowAsContext(); }
// ------------------------ static public void CreateContextMenuForKeyBinding(Object panelOrRig, KeyCode key, System.Action onRefreshCallback = null) { InputRig rig = (panelOrRig as InputRig); TouchControlPanel panel = (panelOrRig as TouchControlPanel); string axisName = null; //bool displayPanelName = false; if (panel != null) { rig = panel.rig; } else if (rig != null) { // Auto Select panel... panel = TouchControlWizardUtils.GetRigPanel(rig); //displayPanelName = true; } else { return; } List <TouchControl> controlList = rig.GetTouchControls(); GenericMenu menu = new GenericMenu(); string commandName = (string.IsNullOrEmpty(axisName) ? ("\"" + key.ToString() + "\" keycode ") : ("\"" + axisName + "\" axis ")); menu.AddDisabledItem(new GUIContent("Actions for : " + commandName)); menu.AddSeparator(""); { UniversalBindingAssignment.AddBindingContainerToMenu(menu, rig, onRefreshCallback, BindingDescription.BindingType.Digital, commandName, "Bind to Input Rig/", rig, key, null); //, null); menu.AddSeparator(""); if (panel == null) { menu.AddDisabledItem(new GUIContent("Add a Touch Control Panel to this rig to create and bind commands to Touch Controls!")); } else { UniversalBindingAssignment.AddControlListBindingsToMenu(menu, controlList, onRefreshCallback, BindingDescription.BindingType.Digital, commandName, "Bind to Touch Controls/", key, null); // true); //, null); menu.AddSeparator(""); AddTouchControlCreationItemsToMenuForAxisOrKey(menu, panel, null, key, onRefreshCallback); } } menu.ShowAsContext(); }
// ----------------- static private void AddTouchControlCreationItemsToMenuForAxisOrKey(GenericMenu menu, TouchControlPanel panel, string axisName, KeyCode key, System.Action onRefreshCallback) { string commandName = (string.IsNullOrEmpty(axisName) ? ("\"" + key.ToString() + "\" keycode ") : ("\"" + axisName + "\" axis ")); menu.AddSeparator("Create a Button/"); WizardMenuItem.AddToMenu(menu, "Create a Button/Button with " + commandName + "bound to [Press] ...", panel, typeof(TouchButtonCreationWizard), TouchButtonCreationWizard.BindingSetup.PressKeyOrAxis(key, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Button/Button with " + commandName + "bound to [Toggle]...", panel, typeof(TouchButtonCreationWizard), TouchButtonCreationWizard.BindingSetup.ToggleKeyOrAxis(key, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Button/Button...", panel, typeof(TouchButtonCreationWizard), null, onRefreshCallback); // menu.AddSeparator(""); WizardMenuItem.AddToMenu(menu, "Create a Joystick/Joystick with " + commandName + "bound to [Press]...", panel, typeof(TouchJoystickCreationWizard), TouchJoystickCreationWizard.BindingSetup.PressKeyOrAxis(key, axisName), onRefreshCallback); if (!string.IsNullOrEmpty(axisName)) { WizardMenuItem.AddToMenu(menu, "Create a Joystick/Joystick with " + commandName + "bound to [Horizontal Axis]...", panel, typeof(TouchJoystickCreationWizard), TouchJoystickCreationWizard.BindingSetup.HorzAxis(axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Joystick/Joystick with " + commandName + "bound to [Vertical Axis]...", panel, typeof(TouchJoystickCreationWizard), TouchJoystickCreationWizard.BindingSetup.VertAxis(axisName), onRefreshCallback); } menu.AddSeparator("Create a Joystick/"); WizardMenuItem.AddToMenu(menu, "Create a Joystick/Joystick...", panel, typeof(TouchJoystickCreationWizard), null, onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Wheel/Wheel with " + commandName + "bound to [Press]...", panel, typeof(TouchWheelCreationWizard), TouchWheelCreationWizard.BindingSetup.PressKeyOrAxis(key, axisName), onRefreshCallback); if (!string.IsNullOrEmpty(axisName)) { WizardMenuItem.AddToMenu(menu, "Create a Wheel/Wheel with " + commandName + "bound to [Analog Turn]...", panel, typeof(TouchWheelCreationWizard), TouchWheelCreationWizard.BindingSetup.TurnAxis(axisName), onRefreshCallback); } menu.AddSeparator("Create a Wheel/"); WizardMenuItem.AddToMenu(menu, "Create a Wheel/Wheel...", panel, typeof(TouchWheelCreationWizard), null, onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a TrackPad/TrackPad with " + commandName + "bound to [Press] bound to " + commandName + "...", panel, typeof(TouchTrackPadCreationWizard), TouchTrackPadCreationWizard.BindingSetup.PressKeyOrAxis(key, axisName), onRefreshCallback); if (!string.IsNullOrEmpty(axisName)) { WizardMenuItem.AddToMenu(menu, "Create a TrackPad/TrackPad with " + commandName + "bound to [Horz. Swipe Delta]...", panel, typeof(TouchTrackPadCreationWizard), TouchTrackPadCreationWizard.BindingSetup.HorzAxis(axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a TrackPad/TrackPad with " + commandName + "bound to [Vert. Swipe Delta]...", panel, typeof(TouchTrackPadCreationWizard), TouchTrackPadCreationWizard.BindingSetup.VertAxis(axisName), onRefreshCallback); } menu.AddSeparator("Create a TrackPad/"); WizardMenuItem.AddToMenu(menu, "Create a TrackPad/TrackPad...", panel, typeof(TouchTrackPadCreationWizard), null, onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Single-finger Press]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.PressKeyOrAxis(1, key, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Single-finger Tap]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.TapKeyOrAxis(1, key, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Two-finger Press]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.PressKeyOrAxis(2, key, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Two-finger Tap]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.TapKeyOrAxis(2, key, axisName), onRefreshCallback); if (!string.IsNullOrEmpty(axisName)) { WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Single-finger Horz. Swipe Delta]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.HorzSwipeAxis(1, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Single-finger Vert. Swipe Delta]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.VertSwipeAxis(1, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Two-finger Horz. Swipe Delta]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.HorzSwipeAxis(2, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Two-finger Vert. Swipe Delta]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.VertSwipeAxis(2, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Single-finger Horz. Scroll]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.HorzScrollAxis(1, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Single-finger Vert. Scroll]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.VertScrollAxis(1, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Two-finger Horz. Scroll]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.HorzScrollAxis(2, axisName), onRefreshCallback); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone with " + commandName + "bound to [Two-finger Vert. Scroll]...", panel, typeof(SuperTouchZoneCreationWizard), SuperTouchZoneCreationWizard.BindingSetup.VertScrollAxis(2, axisName), onRefreshCallback); } menu.AddSeparator("Create a Super Touch Zone/"); WizardMenuItem.AddToMenu(menu, "Create a Super Touch Zone/Super Touch Zone...", panel, typeof(SuperTouchZoneCreationWizard), null, onRefreshCallback); }