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); }
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; } }