Пример #1
0
        public static System.Enum LabeledEnumField(Rect r, GUIContent label, System.Enum enumVal, GUIStyle style, bool zoomCompensate = false)
        {
            Rect leftRect  = new Rect(r);
            Rect rightRect = new Rect(r);
            int  width     = WidthOf(label, style) + 4;

            leftRect.width  = width;
            rightRect.xMin += width;
            GUI.Label(leftRect, label, style);

            return(SF_GUI.EnumPopup(rightRect, GUIContent.none, enumVal, EditorStyles.popup, zoomCompensate));
            //return EditorGUI.EnumPopup( rightRect, GUIContent.none, enumVal, EditorStyles.popup );
            //return EnumPopupZoomCompensated( rightRect, enumVal );
        }