Mostly Harmless
UE3:UIContextMenu (UT3)
Object >> UIRoot >> UIScreenObject >> UIObject >> UIList >> UIContextMenu |
Contents
- Package:
- Engine
- Implemented interfaces:
- UIDataStorePublisher
- Known classes within UIContextMenu:
- UIComp_ContextMenuListPresenter
- Direct subclass:
- UTUI_ContextMenu
- This class in other games:
- UDK
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
Displays a list of options for the user to choose from. Invoked when the user right-clicks on a widget which supports context menus, and the list of available options are context sensitive. Items can be either static (using static data providers) or modified at runtime.
Copyright 2007 Epic Games, Inc. All Rights Reserved
Properties
bResolvePosition
Type: bool
Modifiers: transient, const
indicates that this context menu's position needs to be re-resolved during the next scene update
InvokingWidget
Type: UIObject
Modifiers: transient, const
the widget that invoked this context menu
MenuItems
Type: array<ContextMenuItem>
Modifiers: transient, const
Default values
Property | Value | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bEnableActiveCursorUpdates | True | ||||||||||||||
bEnableVerticalScrollbar | False | ||||||||||||||
bHidden | True | ||||||||||||||
bSingleClickSubmission | True | ||||||||||||||
bSupportsPrimaryStyle | True | ||||||||||||||
bUpdateItemUnderCursor | True | ||||||||||||||
CellDataComponent | UIComp_ContextMenuListPresenter'ContextMenuDataComponent' | ||||||||||||||
ColumnAutoSizeMode | CELLAUTOSIZE_AdjustList | ||||||||||||||
Position |
|
||||||||||||||
PrimaryStyle |
|
||||||||||||||
RowAutoSizeMode | CELLAUTOSIZE_AdjustList | ||||||||||||||
WrapType | LISTWRAP_Jump |
Subobjects
ContextMenuDataComponent
Class: Engine.UIComp_ContextMenuListPresenter
Property | Value |
---|---|
ListItemOverlay[0] | UITexture'Engine.Default__UIContextMenu:ContextMenuDataComponent.NormalOverlayTemplate' |
ListItemOverlay[1] | UITexture'Engine.Default__UIContextMenu:ContextMenuDataComponent.ActiveOverlayTemplate' |
ListItemOverlay[2] | UITexture'Engine.Default__UIContextMenu:ContextMenuDataComponent.SelectionOverlayTemplate' |
ListItemOverlay[3] | UITexture'Engine.Default__UIContextMenu:ContextMenuDataComponent.HoverOverlayTemplate' |
WidgetEventComponent
Class: Engine.UIComp_Event
Inherits from: UIList.WidgetEventComponent
No new values.
Enums
EContextMenuItemType
Different types of context menu items
- CMIT_Normal
- A normal menu item
- CMIT_Submenu
- A context menu item that has a submenu which is shown when the mouse is held over this menu item for a few seconds
- CMIT_Separator
- Separates a group of context menu items
- CMIT_Check
- Context menu item that supports a two states - on and off. State is represented by a check next to the item
- CMIT_Radio
- Similar to CMIT_Check, except that only one menu item in a particular group can be selected at one time
Todo: ronp - determine how groups will be defined
Structs
ContextMenuItem
Modifiers: native, transient
Represents a single item in a context menu
Note: temporary; not sure if this struct will actually be used
- UIContextMenu OwnerMenu
- pointer{struct FContextMenuItem} ParentItem
- EContextMenuItemType ItemType
- string ItemText
- int ItemId
Default values:
Property | Value |
---|---|
ItemId | -1 |
ItemType | CMIT_Normal |
Functions
Native functions
Close
Closes this context menu.
Returns:
- TRUE if the context menu closed successfully; FALSE if it didn't close (as a result of OnClose returning FALSE, for example)
IsActiveContextMenu
Returns TRUE if this context menu is the scene's currently active context menu.
Open
Opens this context menu. Called by the owning scene when a new context menu is activated.
Parameters:
- PlayerIndex - the index of the player that triggered the context menu to be opened.
Returns:
- TRUE if the context menu was successfully opened.
Events
ClearMenuItems
Removes all context menu items from this context menu.
Parameters:
- Widget - the widget that invoked this context menu
Returns:
- TRUE if the operation was successful.
FindMenuItemIndex
Finds the location of a string in the context menu's array of items.
Parameters:
- Widget - the widget that invoked this context menu
- ItemToFind - the string to find
Returns:
- the index for the specified value, or INDEX_NONE if it couldn't be found.
GetAllMenuItems
Gets a list of the current context menu items strings.
Parameters:
- Widget - the widget that invoked this context menu
- out_MenuItems - receives the context menu item strings
Returns:
- TRUE if the operation was successful.
GetMenuItem
Gets the value of the context menu item located at a specified position in the array.
Parameters:
- Widget - the widget that invoked this context menu
- IndexToGet - the index of the context menu item to get
- out_MenuItem - receives the value of the context menu item text.
Returns:
- TRUE if the value was successfully retrieved and copied to out_MenuItem.
InsertMenuItem
Sets the text for a single context menu item.
Parameters:
- Widget - the widget that invoked this context menu
- Item - the text to add/insert to the context menu
- InsertIndex - the location [in the list's items array] to insert the new menu item; if not specified, will be appended to the end of the array.
- bAllowDuplicates - specify TRUE to allow multiple menu items with the same value; otherwise, the new value will not be added if an existing item has the same value.
Returns:
- TRUE if the operation was successful.
RemoveMenuItem
Removes a single menu item from the context menu.
Parameters:
- Widget - the widget that invoked this context menu
- ItemToRemove - the string that should be removed from the context menu
Returns:
- TRUE if the value was successfully removed or didn't exist in the first place.
RemoveMenuItemAtIndex
Removes the context menu item located at a specified position in the array.
Parameters:
- Widget - the widget that invoked this context menu
- IndexToRemove - the index of the item that should be removed.
Returns:
- TRUE if the value was successfully removed; FALSE if IndexToRemove wasn't valid or the value couldn't be removed.
SetMenuItems
Sets the text that will be displayed in the context menu items.
Parameters:
- Widget - the widget that invoked this context menu
- NewMenuItems - the menu items to use in the context menu
- bClearExisting - specify TRUE to clear any existing menu items; otherwise, the new items will be appended to the old
- InsertIndex - the location [in the list's items array] to insert the new menu items at; only relevant if bClearExisting is FALSE
Returns:
- TRUE if the operation was successful.