Ejemplo n.º 1
0
        private void DrawTopSection(float topSectionHeight)
        {
            GUI.Label(new Rect(1f, 0.0f, this.position.width - 2f, topSectionHeight), string.Empty, EditorStyles.inspectorBig);
            float num1     = 7f;
            float num2     = 11f;
            float y1       = num1;
            Rect  position = new Rect(num2 - 2f, y1, 80f, 20f);

            AnnotationUtility.use3dGizmos = GUI.Toggle(position, AnnotationUtility.use3dGizmos, this.icon3dGizmoContent);
            float iconSize = AnnotationUtility.iconSize;

            if (AnnotationWindow.s_Debug)
            {
                GUI.Label(new Rect(0.0f, y1 + 10f, this.position.width - num2, 20f), AnnotationWindow.ConvertTexelWorldSizeToString(iconSize), AnnotationWindow.m_Styles.texelWorldSizeStyle);
            }
            EditorGUI.BeginDisabledGroup(!AnnotationUtility.use3dGizmos);
            float width = 160f;
            float num3  = AnnotationWindow.ConvertTexelWorldSizeTo01(iconSize);
            float num4  = GUI.HorizontalSlider(new Rect(this.position.width - num2 - width, y1, width, 20f), num3, 0.0f, 1f);

            if (GUI.changed)
            {
                AnnotationUtility.iconSize = AnnotationWindow.Convert01ToTexelWorldSize(num4);
                SceneView.RepaintAll();
            }
            EditorGUI.EndDisabledGroup();
            float y2 = y1 + 20f;

            EditorGUI.BeginDisabledGroup(this.m_IsGameView);
            position = new Rect(num2 - 2f, y2, 80f, 20f);
            AnnotationUtility.showGrid = GUI.Toggle(position, AnnotationUtility.showGrid, this.showGridContent);
            EditorGUI.EndDisabledGroup();
        }
Ejemplo n.º 2
0
        private void DrawTopSection(float topSectionHeight)
        {
            GUI.Label(new Rect(1f, 0f, base.position.width - 2f, topSectionHeight), string.Empty, EditorStyles.inspectorBig);
            float num      = 7f;
            float num2     = 11f;
            float num3     = num;
            Rect  position = new Rect(num2 - 2f, num3, 80f, 20f);

            AnnotationUtility.use3dGizmos = GUI.Toggle(position, AnnotationUtility.use3dGizmos, this.icon3dGizmoContent);
            float iconSize = AnnotationUtility.iconSize;

            if (AnnotationWindow.s_Debug)
            {
                Rect position2 = new Rect(0f, num3 + 10f, base.position.width - num2, 20f);
                GUI.Label(position2, AnnotationWindow.ConvertTexelWorldSizeToString(iconSize), AnnotationWindow.m_Styles.texelWorldSizeStyle);
            }
            using (new EditorGUI.DisabledScope(!AnnotationUtility.use3dGizmos))
            {
                float num4      = 160f;
                float num5      = AnnotationWindow.ConvertTexelWorldSizeTo01(iconSize);
                Rect  position3 = new Rect(base.position.width - num2 - num4, num3, num4, 20f);
                num5 = GUI.HorizontalSlider(position3, num5, 0f, 1f);
                if (GUI.changed)
                {
                    AnnotationUtility.iconSize = AnnotationWindow.Convert01ToTexelWorldSize(num5);
                    SceneView.RepaintAll();
                }
            }
            num3 += 20f;
            using (new EditorGUI.DisabledScope(this.m_IsGameView))
            {
                position = new Rect(num2 - 2f, num3, 80f, 20f);
                AnnotationUtility.showGrid = GUI.Toggle(position, AnnotationUtility.showGrid, this.showGridContent);
            }
        }