Exemple #1
0
            // ----------------------
            public void Apply(TouchJoystickCreationWizard wizard)
            {
                SetupDigitalBinding(wizard.pressBinding, this.pressAxis, this.pressKey);

                SetupAxisBinding(wizard.horzAxisBinding, this.horzAxis);
                SetupAxisBinding(wizard.vertAxisBinding, this.vertAxis);
            }
Exemple #2
0
        // ----------------
        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();
            }
        }
Exemple #3
0
        // ---------------
        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...
        }