Пример #1
0
        public static void OnGUI(Rect position, P3dWindowBrushTip tip, GUIContent label)
        {
            tip.Group = Mathf.Clamp(tip.Group, 0, 31);

            var right  = position; right.xMin += EditorGUIUtility.labelWidth;
            var handle = "Group " + tip.Group;

            EditorGUI.LabelField(position, label);

            if (GUI.Button(right, handle, EditorStyles.popup) == true)
            {
                var menu = new GenericMenu();

                for (var i = 0; i < 32; i++)
                {
                    var index   = i;
                    var content = new GUIContent("Group " + i);
                    var on      = tip.Group == index;

                    menu.AddItem(content, on, () => { tip.Group = index; });
                }

                menu.DropDown(right);
            }
        }
Пример #2
0
 public void CopyTo(P3dWindowBrushTip other)
 {
     other.Technique  = Technique;
     other.Group      = Group;
     other.BlendMode  = BlendMode;
     other.Texture    = Texture;
     other.Shape      = Shape;
     other.Strength   = Strength;
     other.Tiling     = Tiling;
     other.Color      = Color;
     other.Opacity    = Opacity;
     other.KernelSize = KernelSize;
     other.Radius     = Radius;
     other.Depth      = Depth;
     other.Hardness   = Hardness;
     other.OneSided   = OneSided;
 }
Пример #3
0
 public void CopyTo(P3dWindowBrushTip other)
 {
     other.Technique   = Technique;
     other.Group       = Group;
     other.BlendMode   = BlendMode;
     other.Texture     = Texture;
     other.Shape       = Shape;
     other.Strength    = Strength;
     other.Tiling      = Tiling;
     other.Color       = Color;
     other.Opacity     = Opacity;
     other.KernelSize  = KernelSize;
     other.Radius      = Radius;
     other.Angle       = Angle;
     other.Depth       = Depth;
     other.Hardness    = Hardness;
     other.NormalBack  = NormalBack;
     other.NormalFront = NormalFront;
     other.NormalRange = NormalRange;
 }