コード例 #1
0
 public static float FloatFieldFixedWidth(GUIContent label, float value)
 {
     return(FloatFieldFixedWidth(
                EditorGUILayoutInternal.GetControlRect(
                    false,
                    16f,
                    EditorStyles.textField,
                    null
                    ),
                label,
                value));
 }
コード例 #2
0
 public static bool ToggleFixedWidth(GUIContent label, bool value)
 {
     return(ToggleFixedWidth(
                EditorGUILayoutInternal.GetControlRect(
                    false,
                    16f,
                    EditorStyles.toggle,
                    null
                    ),
                label,
                value));
 }
コード例 #3
0
        protected Rect BeginProperty(SerializedProperty property, GUIContent label, float height)
        {
            Rect position =
                EditorGUILayoutInternal.GetControlRect(
                    true,
                    height,
                    EditorStyles.layerMaskField,
                    null);

            EditorGUI.BeginProperty(position, label, property);
            EditorGUI.BeginChangeCheck();

            return(position);
        }
コード例 #4
0
        public static int IntSliderFixedWidth(GUIContent label, int value, int leftValue, int rightValue)
        {
            using (new FixedWidthLabel(label)) {
                value =
                    EditorGUI.IntSlider(
                        EditorGUILayoutInternal.GetControlRect(
                            false,
                            16f,
                            EditorStyles.toggle,
                            null
                            ),
                        "",
                        value,
                        leftValue,
                        rightValue
                        );

                return(value);
            }
        }