public void OnGUI(Rect rect) { this.Init(); if (ParticleSystemCurveEditor.s_Styles == null) { ParticleSystemCurveEditor.s_Styles = new ParticleSystemCurveEditor.Styles(); } Rect position = new Rect(rect.x, rect.y, rect.width, rect.height - 30f); Rect rect1 = new Rect(rect.x, rect.y + position.height, rect.width, 30f); GUI.Label(position, GUIContent.none, ParticleSystemCurveEditor.s_Styles.curveEditorBackground); this.m_CurveEditor.rect = position; this.m_CurveEditor.OnGUI(); foreach (CurveWrapper animationCurve in this.m_CurveEditor.animationCurves) { if (animationCurve.getAxisUiScalarsCallback != null && animationCurve.setAxisUiScalarsCallback != null) { Vector2 newAxisScalars = animationCurve.getAxisUiScalarsCallback(); if ((double)newAxisScalars.y > 1000000.0) { newAxisScalars.y = 1000000f; animationCurve.setAxisUiScalarsCallback(newAxisScalars); } } } this.DoLabelForTopMostCurve(new Rect(rect.x + 4f, rect.y, rect.width, 20f)); this.DoRemoveSelectedButton(new Rect(position.x, position.y, position.width, 24f)); this.DoOptimizeCurveButton(rect1); rect1.x += 30f; rect1.width -= 60f; this.PresetCurveButtons(rect1, rect); this.SaveChangedCurves(); }
public void OnGUI(Rect rect) { this.Init(); if (ParticleSystemCurveEditor.s_Styles == null) { ParticleSystemCurveEditor.s_Styles = new ParticleSystemCurveEditor.Styles(); } Rect rect2 = new Rect(rect.x, rect.y, rect.width, rect.height - 30f); Rect rect3 = new Rect(rect.x, rect.y + rect2.height, rect.width, 30f); GUI.Label(rect2, GUIContent.none, ParticleSystemCurveEditor.s_Styles.curveEditorBackground); this.m_CurveEditor.rect = rect2; this.m_CurveEditor.OnGUI(); CurveWrapper[] animationCurves = this.m_CurveEditor.animationCurves; for (int i = 0; i < animationCurves.Length; i++) { CurveWrapper curveWrapper = animationCurves[i]; if (curveWrapper.getAxisUiScalarsCallback != null && curveWrapper.setAxisUiScalarsCallback != null) { Vector2 newAxisScalars = curveWrapper.getAxisUiScalarsCallback(); if (newAxisScalars.y > 1000000f) { newAxisScalars.y = 1000000f; curveWrapper.setAxisUiScalarsCallback(newAxisScalars); } } } this.DoLabelForTopMostCurve(new Rect(rect.x + 4f, rect.y, rect.width, 20f)); this.DoRemoveSelectedButton(new Rect(rect2.x, rect2.y, rect2.width, 24f)); this.DoOptimizeCurveButton(rect3); rect3.x += 30f; rect3.width -= 60f; this.PresetCurveButtons(rect3, rect); this.SaveChangedCurves(); }
public void OnGUI(Rect rect) { this.Init(); if (ParticleSystemCurveEditor.s_Styles == null) { ParticleSystemCurveEditor.s_Styles = new ParticleSystemCurveEditor.Styles(); } Rect rect2 = new Rect(rect.x, rect.y, rect.width, rect.height - 30f); Rect rect3 = new Rect(rect.x, rect.y + rect2.height, rect.width, 30f); GUI.Label(rect2, GUIContent.none, ParticleSystemCurveEditor.s_Styles.curveEditorBackground); this.m_CurveEditor.rect = rect2; this.m_CurveEditor.OnGUI(); this.DoLabelForTopMostCurve(new Rect(rect.x + 4f, rect.y, rect.width, 20f)); this.DoRemoveSelectedButton(new Rect(rect2.x, rect2.y, rect2.width, 24f)); this.DoOptimizeCurveButton(rect3); rect3.x += 30f; rect3.width -= 60f; this.PresetCurveButtons(rect3, rect); this.SaveChangedCurves(); }
public void OnGUI(Rect rect) { this.Init(); if (ParticleSystemCurveEditor.s_Styles == null) ParticleSystemCurveEditor.s_Styles = new ParticleSystemCurveEditor.Styles(); Rect position = new Rect(rect.x, rect.y, rect.width, rect.height - 30f); Rect rect1 = new Rect(rect.x, rect.y + position.height, rect.width, 30f); GUI.Label(position, GUIContent.none, ParticleSystemCurveEditor.s_Styles.curveEditorBackground); this.m_CurveEditor.rect = position; this.m_CurveEditor.OnGUI(); foreach (CurveWrapper animationCurve in this.m_CurveEditor.animationCurves) { if (animationCurve.getAxisUiScalarsCallback != null && animationCurve.setAxisUiScalarsCallback != null) { Vector2 newAxisScalars = animationCurve.getAxisUiScalarsCallback(); if ((double) newAxisScalars.y > 1000000.0) { newAxisScalars.y = 1000000f; animationCurve.setAxisUiScalarsCallback(newAxisScalars); } } } this.DoLabelForTopMostCurve(new Rect(rect.x + 4f, rect.y, rect.width, 20f)); this.DoRemoveSelectedButton(new Rect(position.x, position.y, position.width, 24f)); this.DoOptimizeCurveButton(rect1); rect1.x += 30f; rect1.width -= 60f; this.PresetCurveButtons(rect1, rect); this.SaveChangedCurves(); }