public static void ScrollableTextArea(this Listing_Standard ls, float outerRectHeight, string text, ref Vector2 scrollViewPos, GUIStyle textStyle, float widthShrinkage = 0f) { var scrollViewHeight = ls.CalcHeightForScrollView(text, textStyle, outerRectHeight, widthShrinkage); var textRect = ls.GetRect(outerRectHeight); var scrollViewRect = new Rect(0f, 0f, ls.ColumnWidth - widthShrinkage, scrollViewHeight); Widgets.BeginScrollView(textRect, ref scrollViewPos, scrollViewRect); GUI.TextArea(scrollViewRect, text, textStyle); Widgets.EndScrollView(); }