Beispiel #1
0
        private static Vector2 CalcMinSize(
            GUIStyle style, string str, float redundantWidth = 0, float redundantHeight = 0)
        {
            var size = style.CalcSize(GUIContents.Temp1(str));

            size.x += redundantWidth;
            size.y += redundantHeight;
            return(size);
        }
Beispiel #2
0
 private static float CalcMinWidth(GUIStyle style, string str, float redundant = 0)
 {
     style.CalcMinMaxWidth(GUIContents.Temp1(str), out var min, out _);
     return(min + redundant);
 }