Example #1
0
        protected override void OnGuiBeginSafe(BeginHorizontalAttribute attribute)
        {
            //set a new label width for this area
            EditorGUIUtility.labelWidth = EditorGUIUtility.currentViewWidth * attribute.LabelToWdithRatio;

            //begin horizontal group using internal utilities
            ToolboxLayoutHelper.BeginHorizontal();
        }
        protected override void OnGuiBeginSafe(BeginHorizontalAttribute attribute)
        {
            var width = EditorGUIUtility.currentViewWidth;

            //set a new width value for label/field controls
            EditorGUIUtility.labelWidth = width * attribute.LabelToWidthRatio;
            EditorGUIUtility.fieldWidth = width * attribute.FieldToWidthRatio;

            //begin horizontal group using internal utility
            ToolboxLayoutHelper.BeginHorizontal();
        }
Example #3
0
        protected override void OnGuiBeginSafe(BeginHorizontalGroupAttribute attribute)
        {
            var fixedWidth  = EditorGUIUtility.currentViewWidth;
            var fixedHeight = attribute.Height;

            EditorGUIUtility.labelWidth = fixedWidth * attribute.LabelToWidthRatio;
            EditorGUIUtility.fieldWidth = fixedWidth * attribute.FieldToWidthRatio;

            ToolboxLayoutHelper.BeginVertical(Style.groupBackgroundStyle);
            if (attribute.HasLabel)
            {
                GUILayout.Label(attribute.Label, EditorStyles.boldLabel);
            }

            HandleScrollView(fixedHeight);
            ToolboxLayoutHelper.BeginHorizontal();
        }