C# Class bs.Editor.GUIListBoxField

Editor GUI element that displays a list box with user-specified elements and an optional label. List box can be a standard list-box that allows a single element to be selected, or a multi-select list box where any number of elements can be selected at the same time.
Inheritance: GUIElement
Mostrar archivo Open project: ValtoGameEngines/Banshee-Engine Class Usage Examples

Public Methods

Method Description
DeselectElement ( int idx ) : void

Deselect element the element with the specified index. Only relevant for multi-select list boxes.

GUIListBoxField ( Array elements, GUIContent title, int titleWidth = 100 ) : System

Creates a new single-selection list box with the specified elements and a label.

GUIListBoxField ( Array elements, GUIContent title, int titleWidth, string style = "" ) : System

Creates a new single-selection list box with the specified elements and a label.

GUIListBoxField ( Array elements, bool multiselect = false ) : System

Creates a new list box with the specified elements and no label.

GUIListBoxField ( Array elements, bool multiselect, GUIContent title, int titleWidth = 100 ) : System

Creates a new list box with the specified elements and a label.

GUIListBoxField ( Array elements, bool multiselect, GUIContent title, int titleWidth, string style = "" ) : System

Creates a new list box with the specified elements and a label.

GUIListBoxField ( Array elements, bool multiselect = false, string style = "" ) : System

Creates a new list box with the specified elements and no label.

SelectElement ( int idx ) : void

Makes the element with the specified index selected.

SetElements ( Array elements ) : void

Updates the list box with a new set of elements.

SetTint ( Color color ) : void

Colors the element with a specific tint.

Private Methods

Method Description
DoOnSelectionChanged ( int index ) : void

Triggered by the native interop object when a user selects an object in the list.

Internal_CreateInstance ( GUIListBoxField instance, Array entries, bool multiselect, GUIContent &title, int titleWidth, string style, Array options, bool withTitle ) : void
Internal_DeselectElement ( IntPtr nativeInstance, int idx ) : void
Internal_GetElementStates ( IntPtr nativeInstance ) : bool[]
Internal_GetValue ( IntPtr nativeInstance ) : int
Internal_SelectElement ( IntPtr nativeInstance, int idx ) : void
Internal_SetElementStates ( IntPtr nativeInstance, Array states ) : void
Internal_SetElements ( IntPtr nativeInstance, Array elements ) : void
Internal_SetTint ( IntPtr nativeInstance, Color &color ) : void
Internal_SetValue ( IntPtr nativeInstance, int value ) : void
ToLocalizedElements ( Array elements ) : LocString[]

Converts a set of normal strings to a set of localized strings.

Method Details

DeselectElement() public method

Deselect element the element with the specified index. Only relevant for multi-select list boxes.
public DeselectElement ( int idx ) : void
idx int Sequential index in the elements array provided on construction.
return void

GUIListBoxField() public method

Creates a new single-selection list box with the specified elements and a label.
public GUIListBoxField ( Array elements, GUIContent title, int titleWidth = 100 ) : System
elements Array Array of elements to display in the list box. Elements will be displayed in the same /// order as in the array.
title GUIContent Content to display on the label.
titleWidth int Width of the title label in pixels.
return System

GUIListBoxField() public method

Creates a new single-selection list box with the specified elements and a label.
public GUIListBoxField ( Array elements, GUIContent title, int titleWidth, string style = "" ) : System
elements Array Array of elements to display in the list box. Elements will be displayed in the same /// order as in the array.
title GUIContent Content to display on the label.
titleWidth int Width of the title label in pixels.
style string Optional style to use for the element. Style controls the look of the element, as well as /// default layout options. Style will be retrieved from the active GUISkin. If not specified /// default element style is used.
return System

GUIListBoxField() public method

Creates a new list box with the specified elements and no label.
public GUIListBoxField ( Array elements, bool multiselect = false ) : System
elements Array Array of elements to display in the list box. Elements will be displayed in the same /// order as in the array.
multiselect bool Determines should the listbox allow multiple elements to be selected or just one. ///
return System

GUIListBoxField() public method

Creates a new list box with the specified elements and a label.
public GUIListBoxField ( Array elements, bool multiselect, GUIContent title, int titleWidth = 100 ) : System
elements Array Array of elements to display in the list box. Elements will be displayed in the same /// order as in the array.
multiselect bool Determines should the listbox allow multiple elements to be selected or just one. ///
title GUIContent Content to display on the label.
titleWidth int Width of the title label in pixels.
return System

GUIListBoxField() public method

Creates a new list box with the specified elements and a label.
public GUIListBoxField ( Array elements, bool multiselect, GUIContent title, int titleWidth, string style = "" ) : System
elements Array Array of elements to display in the list box. Elements will be displayed in the same /// order as in the array.
multiselect bool Determines should the listbox allow multiple elements to be selected or just one. ///
title GUIContent Content to display on the label.
titleWidth int Width of the title label in pixels.
style string Optional style to use for the element. Style controls the look of the element, as well as /// default layout options. Style will be retrieved from the active GUISkin. If not specified /// default element style is used.
return System

GUIListBoxField() public method

Creates a new list box with the specified elements and no label.
public GUIListBoxField ( Array elements, bool multiselect = false, string style = "" ) : System
elements Array Array of elements to display in the list box. Elements will be displayed in the same /// order as in the array.
multiselect bool Determines should the listbox allow multiple elements to be selected or just one. ///
style string Optional style to use for the element. Style controls the look of the element, as well as /// default layout options. Style will be retrieved from the active GUISkin. If not specified /// default element style is used.
return System

SelectElement() public method

Makes the element with the specified index selected.
public SelectElement ( int idx ) : void
idx int Sequential index in the elements array provided on construction.
return void

SetElements() public method

Updates the list box with a new set of elements.
public SetElements ( Array elements ) : void
elements Array Array of elements to display in the list box. Elements will be displayed in the same /// order as in the array.
return void

SetTint() public method

Colors the element with a specific tint.
public SetTint ( Color color ) : void
color Color Tint to apply to the element.
return void