ToolbarWrapped

Description
ToolbarWrapped creates a toolbar or selection grid of text buttons that wraps horizontally. Thus, without changing its style, all its buttons fit within its given width in pixels (for example, the screen). The buttons will also be sized to fit the longest string in the array given so that everything is displayed in full. (GUI.Toolbar and GUI.SelectionGrid are currentlyunable to customize their individual buttons' styles to distinguish one from another.) Parameters and usage are the same as with GUI.Toolbar or GUI.SelectionGrid.

Parameters
position: Rectangle in screen coordinates, in which it will be wrapped horizontally and stretched vertically. selected:	 The index of the selected button. texts:	 An array of strings to show on the buttons.

Code
Let me know if you'd like versions for textured buttons, GUIContent buttons, or ones in which you specify your own GUIStyle.