protected override void OnGuiBeginSafe(BeginGroupAttribute attribute) { ToolboxLayoutHelper.BeginVertical(Style.groupBackgroundStyle); if (attribute.HasLabel) { GUILayout.Label(attribute.Label, EditorStyles.boldLabel); } }
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 OnGuiEndSafe(EndHorizontalAttribute attribute) { //end horizontal group ToolboxLayoutHelper.EndHorizontal(); //restore label width EditorGUIUtility.labelWidth = 0.0f; EditorGUIUtility.fieldWidth = 0.0f; }
protected override void OnGuiCloseSafe(EndHorizontalGroupAttribute attribute) { ToolboxLayoutHelper.CloseHorizontal(); EditorGUILayout.EndScrollView(); ToolboxLayoutHelper.CloseVertical(); EditorGUIUtility.labelWidth = 0.0f; EditorGUIUtility.fieldWidth = 0.0f; }
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(); }
protected override void OnGuiBeginSafe(BeginGroupAttribute attribute) { if (attribute.HasLabel) { using (new GUILayout.VerticalScope(Style.labelBackgroundStyle)) { GUILayout.Label(attribute.Label, Style.labelStyle); } GUILayout.Space(Style.labelOffset); } ToolboxLayoutHelper.BeginVertical(Style.groupBackgroundStyle); }
protected override void OnGuiBeginSafe(BeginGroupAttribute attribute) { if (attribute.HasLabel) { using (new GUILayout.HorizontalScope(Style.labelBackgroundStyle)) { //draw group label for the whole section GUILayout.Label(attribute.Label, Style.labelStyle); } //remove additional space between layouts GUILayout.Space(Style.labelOffset); } ToolboxLayoutHelper.BeginVertical(Style.groupBackgroundStyle); }
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(); }
protected override void OnGuiCloseSafe(EndGroupAttribute attribute) { ToolboxLayoutHelper.CloseVertical(); }