UnityEditor.EditorGUILayout.PowerSlider C# (CSharp) Method

PowerSlider() static private method

static private PowerSlider ( GUIContent label, float value, float leftValue, float rightValue, float power ) : float
label UnityEngine.GUIContent
value float
leftValue float
rightValue float
power float
return float
        internal static float PowerSlider(GUIContent label, float value, float leftValue, float rightValue, float power, params GUILayoutOption[] options)
        {
            Rect position = s_LastRect = GetSliderRect(true, options);
            return EditorGUI.PowerSlider(position, label, value, leftValue, rightValue, power);
        }

Same methods

EditorGUILayout::PowerSlider ( string label, float value, float leftValue, float rightValue, float power ) : float

Usage Example

Beispiel #1
0
        public static bool Slider(GUIContent label, ref float value, float displayScale, float displayExponent, string unit, float leftValue, float rightValue, AudioMixerController controller, AudioParameterPath path, params GUILayoutOption[] options)
        {
            EditorGUI.BeginChangeCheck();
            float  fieldWidth = EditorGUIUtility.fieldWidth;
            string kFloatFieldFormatString = EditorGUI.kFloatFieldFormatString;
            bool   flag = controller.ContainsExposedParameter(path.parameter);

            EditorGUIUtility.fieldWidth       = 70f;
            EditorGUI.kFloatFieldFormatString = "F2";
            EditorGUI.s_UnitString            = unit;
            GUIContent content = label;

            if (flag)
            {
                content = GUIContent.Temp(label.text + " ➔", label.tooltip);
            }
            float num2 = value * displayScale;

            num2 = EditorGUILayout.PowerSlider(content, num2, leftValue * displayScale, rightValue * displayScale, displayExponent, options);
            EditorGUI.s_UnitString            = null;
            EditorGUI.kFloatFieldFormatString = kFloatFieldFormatString;
            EditorGUIUtility.fieldWidth       = fieldWidth;
            if ((Event.current.type == EventType.ContextClick) && GUILayoutUtility.topLevel.GetLast().Contains(Event.current.mousePosition))
            {
                ParameterTransitionType type;
                Event.current.Use();
                GenericMenu menu = new GenericMenu();
                if (!flag)
                {
                    if (< > f__mg$cache0 == null)
                    {
All Usage Examples Of UnityEditor.EditorGUILayout::PowerSlider