Пример #1
0
        public static IDraw DrawLabel(this IDraw draw,
                                      string label,
                                      GUIStyle style,
                                      float?height      = null,
                                      float?maxHeight   = null,
                                      float?minHeight   = null,
                                      bool?expandHeight = null,
                                      float?width       = null,
                                      float?maxWidth    = null,
                                      float?minWidth    = null,
                                      bool?expandWidth  = null)
        {
            if (label == null)
            {
                throw new ArgumentNullException(nameof(label));
            }

            var opts = LayoutOptionsCache.ExtractLayoutOptions(height,
                                                               maxHeight,
                                                               minHeight,
                                                               expandHeight,
                                                               width,
                                                               maxWidth,
                                                               minWidth,
                                                               expandWidth);

            LabelDraw.Draw(label, style, opts);

            return(draw);
        }
Пример #2
0
        public static IDraw S_DrawLabel(this IDraw draw,
                                        string label,
                                        GUIStyle style = null)
        {
            if (label == null)
            {
                throw new ArgumentNullException(nameof(label));
            }

            LabelDraw.Draw(label, style, null);

            return(draw);
        }