コード例 #1
0
        public override float DrawInner(ref Rect r)
        {
            float prevYpos = r.y;

            r.y = 0;


            r.xMin += 20;
            r.y    += 20;


            cullMode = (CullMode)UndoableLabeledEnumPopup(r, "Face Culling", cullMode, "face culling");
            r.y     += 20;

            GUI.enabled   = ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Forward;
            normalQuality = (NormalQuality)UndoableContentScaledToolbar(r, "Normal Quality", (int)normalQuality, strNormalQuality, "normal quality");
            GUI.enabled   = true;
            r.y          += 20;

            vertexPositioning = (VertexPositioning)UndoableContentScaledToolbar(r, "Vertex Positioning", (int)vertexPositioning, strVertexPositioning, "vertex positioning");
            r.y += 20;

            GUI.enabled = ps.mOut.normal.IsConnectedEnabledAndAvailable();
            normalSpace = (NormalSpace)UndoableContentScaledToolbar(r, "Normal Space", (int)normalSpace, strNormalSpace, "normal space");
            GUI.enabled = true;
            r.y        += 20;

            vertexOffsetMode = (VertexOffsetMode)UndoableContentScaledToolbar(r, "Vertex offset mode", (int)vertexOffsetMode, vertexOffsetModeStr, "vertex offset mode");
            r.y += 20;

            GUI.enabled      = ps.HasTessellation();
            tessellationMode = (TessellationMode)UndoableLabeledEnumPopupNamed(r, "Tessellation Mode", tessellationMode, tessModeStr, "tessellation mode");
            GUI.enabled      = true;
            r.y += 20;

            GUI.enabled = ps.HasOutline();
            outlineMode = (OutlineMode)UndoableLabeledEnumPopupNamed(r, "Outline Extrude Direction", outlineMode, outlineModeStr, "outline mode");
            GUI.enabled = true;
            r.y        += 20;

            highQualityScreenCoords = UndoableToggle(r, highQualityScreenCoords, "Per-pixel screen coordinates", "per-pixel screen coordinates", null);
            r.y += 20;

            showPixelSnap = UndoableToggle(r, showPixelSnap, "Show 2D sprite pixel snap option in material", "show pixel snap", null);
            r.y          += 20;

            //billboard.
            billboard = (BILLBOARD_TYPE)UndoableContentScaledToolbar(r, "billboard", (int)billboard, strBillboard, "NONE");
            r.y      += 20;

            r.y += prevYpos;

            return((int)r.yMax);
        }
コード例 #2
0
ファイル: SFPSC_Geometry.cs プロジェクト: lwx1010/2D_XProject
        public override float DrawInner(ref Rect r)
        {
            float prevYpos = r.y;

            r.y = 0;


            r.xMin += 20;
            r.y    += 20;


            cullMode = (CullMode)UndoableLabeledEnumPopup(r, "面剔除", cullMode, "face culling");
            r.y     += 20;

            GUI.enabled   = ps.catLighting.renderPath == SFPSC_Lighting.RenderPath.Forward;
            normalQuality = (NormalQuality)UndoableContentScaledToolbar(r, "法线质量", (int)normalQuality, strNormalQuality, "normal quality");
            GUI.enabled   = true;
            r.y          += 20;

            vertexPositioning = (VertexPositioning)UndoableContentScaledToolbar(r, "顶点定位", (int)vertexPositioning, strVertexPositioning, "vertex positioning");
            r.y += 20;

            GUI.enabled = ps.mOut.normal.IsConnectedEnabledAndAvailable();
            normalSpace = (NormalSpace)UndoableContentScaledToolbar(r, "法线空间", (int)normalSpace, strNormalSpace, "normal space");
            GUI.enabled = true;
            r.y        += 20;

            vertexOffsetMode = (VertexOffsetMode)UndoableContentScaledToolbar(r, "顶点偏移模式", (int)vertexOffsetMode, vertexOffsetModeStr, "vertex offset mode");
            r.y += 20;

            GUI.enabled      = ps.HasTessellation();
            tessellationMode = (TessellationMode)UndoableLabeledEnumPopupNamed(r, "细分曲面模式", tessellationMode, tessModeStr, "tessellation mode");
            GUI.enabled      = true;
            r.y += 20;

            GUI.enabled = ps.HasOutline();
            outlineMode = (OutlineMode)UndoableLabeledEnumPopupNamed(r, "描边拉伸方向", outlineMode, outlineModeStr, "outline mode");
            GUI.enabled = true;
            r.y        += 20;

            highQualityScreenCoords = UndoableToggle(r, highQualityScreenCoords, "每像素屏幕坐标(开启:像素 关闭:顶点)", "per-pixel screen coordinates", null);
            r.y += 20;

            showPixelSnap = UndoableToggle(r, showPixelSnap, "在材质中显示二维切片 Pixel snap(像素捕捉)选项", "show pixel snap", null);
            r.y          += 20;

            r.y += prevYpos;

            return((int)r.yMax);
        }
コード例 #3
0
        public override void Deserialize(string key, string value)
        {
            switch (key)
            {
            case "billboard":
                billboard = (BILLBOARD_TYPE)int.Parse(value);
                break;

            case "vtps":
                vertexPositioning = (VertexPositioning)int.Parse(value);
                break;

            case "nrmq":
                normalQuality = (NormalQuality)int.Parse(value);
                break;

            case "nrsp":
                normalSpace = (NormalSpace)int.Parse(value);
                break;

            case "vomd":
                vertexOffsetMode = (VertexOffsetMode)int.Parse(value);
                break;

            case "hqsc":
                highQualityScreenCoords = bool.Parse(value);
                break;

            case "spxs":
                showPixelSnap = bool.Parse(value);
                break;

            case "tesm":
                tessellationMode = (TessellationMode)int.Parse(value);
                break;

            case "olmd":
                outlineMode = (OutlineMode)int.Parse(value);
                break;

            case "culm":
                cullMode = (CullMode)int.Parse(value);
                break;
            }
        }