struct
GUIDropDownMenu::DropDownSubMenu
Contains data about a single drop down box sub-menu.
Public
Constructors
DropDownSubMenu
Creates a new drop down box sub-menu.
- owner
- Owner drop down box this sub menu belongs to.
- parent
- Parent sub-menu. Can be null.
- placement
- Determines how is the sub-menu positioned in the visible area.
- availableBounds
- Available bounds (in pixels) in which the sub-menu may be opened.
- dropDownData
- Data to use for initializing menu items of the sub-menu.
- type
- Type of the drop down box to show.
- depthOffset
- How much to offset the sub-menu depth. We want deeper levels of the sub-menu hierarchy to be in front of lower levels, so you should increase this value for each level of the sub-menu hierarchy.
Methods
~DropDownSubMenu
UpdateGuiElements
Recreates all internal GUI elements for the entries of the current sub-menu page.
ScrollDown
Moves the sub-menu to the previous page and displays its elements, if available.
ScrollUp
Moves the sub-menu to the next page and displays its elements, if available.
ScrollToTop
Moves the sub-menu to the first page and displays its elements.
ScrollToBottom
Moves the sub-menu to the last page and displays its elements.
GetPageInfos
Calculates ranges for all the pages of the sub-menu.
ElementActivated
Called when the user activates an element with the specified index.
- index
- Index of the activated element.
- bounds
- Bounds of the GUI element that is used as a visual representation of this drop down element.
ElementSelected
Called when the user selects an element with the specified index.
- index
- Index of the element that was selected.
CloseSubMenu
Called when the user wants to close the currently open sub-menu.
Close
Closes this sub-menu.
GetVisibleBounds
Returns actual visible bounds of the sub-menu.