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); } }
public static bool ToggleFixedWidth(GUIContent label, bool value) { using (new FixedWidthLabel(label)) { Rect controlRect = EditorGUILayoutInternal.GetControlRect( false, 16f, EditorStyles.toggle, null ); value = GUI.Toggle( controlRect, value, "" ); return(value); } }