Click or drag to resize

GUILayoutStringTable Class

Utility class to draw a simple table with the text colum contents.
Inheritance Hierarchy
SystemObject
  KSPDev.GUIUtilsGUILayoutStringTable

Namespace:  KSPDev.GUIUtils
Assembly:  KSPDev_Utils.2.3 (in KSPDev_Utils.2.3.dll) Version: 2.3 for KSP v1
Syntax
C#
public class GUILayoutStringTable
Request Example View Source

The GUILayoutStringTable type exposes the following members.

Constructors
  NameDescription
Public methodGUILayoutStringTable
Creates a table of the specified column width.
Top
Methods
  NameDescription
Public methodAddTextColumn(String, GUIStyle)
Adds a text column into the table.
Public methodAddTextColumn(String, LocalizableMessage, GUIStyle)
Adds a text column into the table.
Public methodAddTextColumn(String, String, GUIStyle)
Adds a text column into the table with a value tooltip.
Public methodAddTextColumn(String, String, LocalizableMessage, GUIStyle)
Adds a text column into the table with a value tooltip.
Public methodAddTextColumn(GUIContent, GUIStyle, Single, Single)
Adds a content into the table column.
Public methodStartNewRow
Tells that a new row is about to be rendered.
Public methodUpdateFrame
Updates the table state each frame to remember the best column size values.
Top
Remarks

This table cannot hold non-string content. It keeps all the columns to be of the same, and the size is adjusted to the maximum column's size in the rows. There is a one frame delay between the content change and the column resizing, which may result in flickering if the content changes too frequently. The columns try to take as small space as possible, so defining the minimum size may be a good bet.

This class is designed to be called on every frame. It's heavily performance optimized.

See Also