Esempio n. 1
0
        public override void OnGUI(ModuleMaker maker)
        {
            WindowDesignUtility.SectionLabel("Surfaces");

            EditorGUILayout.BeginHorizontal();
            this.template = (ProjectorTemplate)EditorGUILayout.EnumPopup("Template", this.template);
            TemplateToSelection();

            using (new EditorGUI.DisabledScope(this.template != ProjectorTemplate.Custom))
                this.selection = (ProjectorSelection)EditorGUILayout.EnumFlagsField(this.selection);

            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Separator();

            WindowDesignUtility.SectionLabel("Rendering");

            this.target = (CameraTarget)EditorGUILayout.EnumPopup("Camera Target", this.target);

            EditorGUILayout.Separator();

            WindowDesignUtility.SectionLabel("Dimensions");

            bool wideMode = EditorGUIUtility.wideMode;

            EditorGUIUtility.wideMode = true;

            this.width    = EditorGUILayout.FloatField("Width (m)", this.width);
            this.height   = EditorGUILayout.FloatField("Height (m)", this.height);
            this.length   = EditorGUILayout.FloatField("Length (m)", this.length);
            this.position = EditorGUILayout.Vector3Field("Position", this.position);

            EditorGUIUtility.wideMode = wideMode;
        }
Esempio n. 2
0
        public override void OnGUI(ModuleMaker maker)
        {
            WindowDesignUtility.SectionLabel("Sensor");

            bool wideMode = EditorGUIUtility.wideMode;

            EditorGUIUtility.wideMode = true;

            this.sensorLocation = EditorGUILayout.Vector3Field("Location", this.sensorLocation);

            EditorGUIUtility.wideMode = wideMode;

            EditorGUILayout.Separator();

            WindowDesignUtility.SectionLabel("Tracking Area");

            this.trackingAreaWidth  = EditorGUILayout.FloatField("Width (m)", this.trackingAreaWidth);
            this.trackingAreaLength = EditorGUILayout.FloatField("Length (m)", this.trackingAreaLength);


            EditorGUILayout.Separator();

            WindowDesignUtility.SectionLabel("Trackables");

            this.trackableHead  = EditorGUILayout.Toggle("Head", this.trackableHead);
            this.trackableHands = EditorGUILayout.Toggle("Hands", this.trackableHands);
        }
Esempio n. 3
0
        public override void OnGUI(ModuleMaker maker)
        {
            WindowDesignUtility.SectionLabel("Physical Controls");

            bool joycon = maker.IsModuleAvailable <JoyconModule>();

            using (new EditorGUI.DisabledScope(!joycon))
            {
                this.firstPerson = EditorGUILayout.Toggle("First Person", this.firstPerson);

                if (!joycon)
                {
                    EditorGUILayout.HelpBox("Nintendo Joy-Con support required.", MessageType.Warning);
                }
            }

            bool kinect = maker.IsModuleAvailable <KinectModule>();

            using (new EditorGUI.DisabledScope(!joycon || !kinect))
            {
                this.teleporter = EditorGUILayout.Toggle("Teleporter", this.teleporter);

                if (!joycon || !kinect)
                {
                    EditorGUILayout.HelpBox("Nintendo Joy-Con and Microsoft Kinect 2.0 support required.", MessageType.Warning);
                }
            }

            EditorGUILayout.Separator();

            using (new EditorGUI.DisabledScope(this.firstPerson || this.teleporter))
            {
                WindowDesignUtility.SectionLabel("Non-Physical Controls");

                this.freeLook = EditorGUILayout.Toggle("Free Look", this.freeLook);

                if (!joycon)
                {
                    EditorGUILayout.HelpBox("Nintendo Joy-Con support required.", MessageType.Warning);
                }
            }
        }
 public override void OnGUI(ModuleMaker maker)
 {
     WindowDesignUtility.SectionLabel("Bindings");
     this.dpadBindings = EditorGUILayout.Toggle("Dpad", this.dpadBindings);
 }