Exemplo n.º 1
0
        // ------------------
        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);
        }
        // ------------------
        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);
            }
        }
Exemplo n.º 3
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);
            }
        }
Exemplo n.º 4
0
        // ------------------
        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);
            }
        }