// ------------------
        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, BindingSetup bindingSetup = null, System.Action onCreationCallback = null)
        {
            TouchWheelCreationWizard w = (TouchWheelCreationWizard)EditorWindow.GetWindow(typeof(TouchWheelCreationWizard), true, "CF2 Steering Wheel Wizard");

            if (w != null)
            {
                w.Init(panel, bindingSetup, onCreationCallback);
                w.ShowPopup();
            }
        }
        // ------------------
        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);
            }
        }
Beispiel #4
0
        // ------------------
        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.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);
            }
        }