public void ShowInspectorHeader(SerializedProperty operationProp)
 {
     GUILayout.BeginHorizontal();
     ChiselOperationGUI.ShowOperationChoicesInternal(operationProp);
     if (typeof(T) != typeof(ChiselBrush))
     {
         ConvertIntoBrushesButton(serializedObject);
     }
     GUILayout.EndHorizontal();
 }
        public static void ChooseGeneratorOperation(ref CSGOperationType?operation)
        {
            GUILayout.BeginHorizontal();
            EditorGUI.BeginChangeCheck();
            GUILayout.Label("Boolean");
            var result = ChiselOperationGUI.ShowOperationChoicesInternal(operation);

            if (EditorGUI.EndChangeCheck())
            {
                operation = result;
            }
            GUILayout.EndHorizontal();
        }
Exemple #3
0
        public void ShowInspectorHeader(SerializedProperty operationProp)
        {
            GUILayout.Space(3);
            const float kBottomPadding = 3;
            var         rect           = EditorGUILayout.GetControlRect(hasLabel: false, height: EditorGUIUtility.singleLineHeight + kBottomPadding);

            rect.yMax -= kBottomPadding;
            var buttonRect = rect;

            buttonRect.xMax -= ChiselOperationGUI.GetOperationChoicesInternalWidth(showAuto: false);
            if (typeof(T) != typeof(ChiselBrush))
            {
                ConvertIntoBrushesButton(buttonRect, serializedObject);
                ChiselOperationGUI.ShowOperationChoicesInternal(rect, operationProp, showLabel: false);
            }
            else
            {
                ChiselOperationGUI.ShowOperationChoicesInternal(rect, operationProp, showLabel: true);
            }
        }
        public static void ChooseGeneratorOperation(ref CSGOperationType?operation)
        {
            if (styles == null)
            {
                styles = new Styles();
            }

            const float kBottomPadding = 3;
            var         rect           = EditorGUILayout.GetControlRect(hasLabel: true, height: EditorGUIUtility.singleLineHeight + kBottomPadding);

            rect.yMax -= kBottomPadding;
            EditorGUI.BeginChangeCheck();
            rect.yMin += 2;
            EditorGUI.PrefixLabel(rect, EditorGUIUtility.TrTextContent("Operation"));
            rect.yMin -= 2;
            var result = ChiselOperationGUI.ShowOperationChoicesInternal(rect, operation);

            if (EditorGUI.EndChangeCheck())
            {
                operation = result;
            }
        }
 public static void ShowOperationChoices(SerializedProperty operationProp)
 {
     EditorGUILayout.BeginHorizontal();
     ChiselOperationGUI.ShowOperationChoicesInternal(operationProp);
     EditorGUILayout.EndHorizontal();
 }