class
GUIDropDownContent
GUI element that is used for representing entries in a drop down menu.
Public
Methods
staticGetGuiTypeName
Returns type name of the GUI element used for finding GUI element styles.
staticCreate
Creates a new drop down contents element.
staticCreate
Creates a new drop down contents element.
- parent
- Parent sub-menu that owns the drop down contents.
- dropDownData
- Data that will be used for initializing the child entries.
- options
- Options that allow you to control how is the element positioned and sized. This will override any similar options set by style.
- style
- Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on. If not specified default button style is used.
SetRange
Changes the range of the displayed elements.
GetElementHeight
Returns height of a menu element at the specified index, in pixels.
SetKeyboardFocus
Enables or disables keyboard focus.
When keyboard focus is enabled the contents will respond to keyboard events.
Protected
Constructors
GUIDropDownContent
Methods
GetElementLocalizedName
Get localized name of a menu item element with the specified index.
CalculateUnconstrainedOptimalSize
Calculates the optimal size for the GUI element, ignoring size constraints.
UpdateLayoutForChildren
Calculates sizes and relative positions for all child elements.
Should be preceded with a call to UpdateOptimalLayoutSizes().
DoOnCommandEvent
Called when a command event is triggered.
Return true if you have processed the event and don't want other elements to process it.
DoOnMouseEvent
Called when a mouse event is received on any GUI element the mouse is interacting with.
Return true if you have processed the event and don't want other elements to process it.
SetSelected
Marks the element with the specified index as selected.
- index
- Index of the displayed element (indexing visible elements).
SelectNext
Selects the next available non-separator entry.
- startIndex
- Index of the menu element.
SelectPrevious
Selects the previous available non-separator entry.
- startIndex
- Index of the menu element.