UE3:UIObject (UDK)
Object >> UIRoot >> UIScreenObject >> UIObject |
- Package:
- Engine
- Known classes within UIObject:
- UIComp_AutoAlignment, UIComp_DrawCaption, UIComp_DrawComponents, UIComp_DrawImage, UIComp_DrawString, UIComp_DrawStringSlider, UIComp_DrawTeamColoredImage, UIComp_UTDrawStateImage, UIComp_UTGlowString
- Direct subclasses:
- ConsoleEntry, UIButton, UIComboBox, UIContainer, UIEditBox, UIImage, UILabel, UIList, UIMeshWidget, UIOptionListBase, UIPrefab, UIPrefabInstance, UIProgressBar, UIScrollbar, UISlider, UITabControl, UTUI_Widget
- This class in other games:
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. |
Base class for all UI widgets.
Constants
FIRST_DEFAULT_DATABINDING_INDEX
Value: 100
used to differentiate tooltip bindings from others
TOOLTIP_BINDING_INDEX
Value: 100
CONTEXTMENU_BINDING_INDEX
Value: 101
Properties
Property group 'Appearance'
DockTargets
Type: UIRoot.UIDockingSet
Modifiers: editconst
The widgets that this widget should be docked to. For the 'right' and 'bottom' faces, if the widget has no dock target, it is considered docked to the 'left' and 'top' faces, respectively.
Default value:
Member | Value |
---|---|
TargetFace[0] | INVALID |
TargetFace[1] | INVALID |
TargetFace[2] | INVALID |
TargetFace[3] | INVALID |
RenderBounds
Type: float
Array size: 4 (EUIWidgetFace.UIFACE_MAX
)
Modifiers: editconst, private, const, transient
Represents the bounding region available for the widget to render itself in. Set through the docking system.
RenderBoundsVertices
Type: Object.Vector2D
Array size: 4 (EUIWidgetFace.UIFACE_MAX
)
Modifiers: editconst, private, const, transient
Represents the location of the corners of the widget including any tranforms, in absolute pixels (pixel space). Starts at the upper-left corner of the widget and goes clockwise.
RenderOffset
Type: Object.Vector
Screenspace offset to apply to the widget's rendering.
Rotation
Type: UIRoot.UIRotation
Rotation of the widget.
Default value:
Member | Value | ||||||
---|---|---|---|---|---|---|---|
AnchorPosition |
| ||||||
AnchorType | RA_Center |
WidgetTag
Type: name
Modifiers: editconst
Unique non-localized name for this widget which is used to reference the widget without needing to know its GUID
Property group 'Data'
ContextMenuData
Type: UIRoot.UIDataStoreBinding
Modifiers: private, editconst
Default value:
Member | Value |
---|---|
RequiredFieldType | DATATYPE_Collection |
ToolTip
Type: UIRoot.UIDataStoreBinding
Modifiers: private
The tool tip for this widget; only relevant for widgets that implement the UIDataStoreSubscriber interface.
Property group 'Interaction'
Type: UIRoot.UINavigationData
Controls which widgets are given focus when this widget receives an event that changes the currently focused widget.
PlayerInputMask
Type: byte
A bitmask representing the player indexes that this control will process input for, where the value is generated by left bitshifting by the index of the player. A value of 0xF indicates that this control will process input from all players. A value of 1 << 1 indicate that only input from player at index 1 will be acccepted, etc. So value of 3 means that this control processes input from players at indexes 0 and 1. Input from player indexes that do not match the mask will be ignored.
By default, the input mask comes from the scene. Widgets can override this value to allow more or less players to interact with that widget - this override value is stored in the upper 4 bits.
Default value: 15
TabIndex
Type: int
Allows the designer to specify where this widget occurs in the bound (i.e. tab, shift+tab) navigation network of this widget's parent.
Default value: -1
Property group 'PostProcess'
MaskPostProcess
Type: UIRoot.EUIPostProcessGroup
Post process mask for the UI object.
UIPostProcess_None - no masking enabled UIPostProcess_Background - Only mask the UI object for the background post process pass UIPostProcess_Foreground - Only mask the UI object for the foreground post process pass UIPostProcess_BackgroundAndForeground - Both the background/foreground post process passes are masked to this object
Property group 'ZDebug'
bDebugShowBounds
Type: bool
Set to true to render an outline marking the widget's RenderBounds.
DebugBoundsColor
Type: Object.Color
if bRenderBoundingRegion is TRUE, specifies the color to use for this widget.
Default value:
Member | Value |
---|---|
A | 255 |
B | 255 |
G | 128 |
R | 255 |
Internal variables
AnimationParent
Type: UIObject
Used as the parent in animation sequences
bEnableActiveCursorUpdates
Type: bool
Modifiers: private
Indicates that this widget should receive a call each tick with the location of the mouse cursor while it's the active control (NotifyMouseOver) (caution: slightly degrades performance)
bEnableSceneUpdateNotifications
Type: bool
Indicates that this widget needs to perform work when the scene is updated. If TRUE, the widget will recieve calls to both PreSceneUpdate() and PostSceneUpdate().
bSupportsPrimaryStyle
Type: bool
Modifiers: const
Temp hack to allow widgets to remove "Primary Style" from the styles listed in the context menu for that widget if they no longer use it. Will be removed once I am ready to deprecate the PrimaryStyle property.
Default value: True
Owner
Type: UIObject
Modifiers: const, private, duplicatetransient
the UIObject that contains this widget in its Children array
OwnerScene
Type: UIScene
Modifiers: const, private, duplicatetransient
The scene that owns this widget
PrimaryStyle
Type: UIRoot.UIStyleReference
Specifies the style data to use for this widget
Default value:
Member | Value |
---|---|
DefaultStyleTag | 'DefaultComboStyle' |
PrivateFlags
Type: int
Modifiers: private
Stores a bitmask of flags which modify/define which operations may be performed to this widget (such as renaming, reparenting, selecting, etc.).
Valid behavior flags are defined in UIRoot.uc, as consts which begin with PRIVATE_
StyleSubscribers
Type: array<UIStyleResolver>
Modifiers: transient
List of objects/components contained by this widget which contain their own style references. When this widget's style is resolved, each element in this list will receive a notification to resolve its style references as well.
Elements should be added to this list either from the native InitializeStyleSubscribers method [for native classes], the Initialized event [for non-native classes], or the native PostEditChange method (when e.g. components are created or removed using the UI editor's property window).
You should NEVER add elements to this array using defaultproperties, since interface properties will not be updated to point to the subobject/component instance when this widget is created.
WidgetID
Type: UIRoot.WIDGET_ID
Modifiers: noimport
Unique identifier for this widget
Default values
Property | Value |
---|---|
EventProvider | UIComp_Event'WidgetEventComponent' |
Subobjects
WidgetEventComponent
Class: Engine.UIComp_Event
Property | Value | ||||
---|---|---|---|---|---|
DefaultEvents[0] |
|
Delegates
OnClicked
Called when the widget is no longer being pressed. Not implemented by all widget types.
The difference between this delegate and the OnPressRelease delegate is that OnClick will only be called on the widget that received the matching key press. OnPressRelease will be called on whichever widget was under the cursor when the key was released, which might not necessarily be the widget that received the key press.
Parameters:
- EventObject - Object that issued the event.
- PlayerIndex - Player that performed the action that issued the event.
Returns:
- return TRUE to prevent the kismet OnClick event from firing.
OnCloseContextMenu
Called when the system wants to close the currently active context menu.
Parameters:
- ContextMenu - the context menu that is going to be closed
- PlayerIndex - the index of the player that generated the request for the context menu to be closed.
Returns:
- TRUE to allow the specified context menu to be closed; FALSE to prevent the context menu from being closed. Note that there are certain situations where the context menu will be closed regardless of the return value, such as when the scene which owns the context menu is being closed.
OnContextMenuItemSelected
Called when the user selects a choice from a context menu.
Parameters:
- ContextMenu - the context menu that called this delegate.
- PlayerIndex - the index of the player that generated the event.
- ItemIndex - the index [into the context menu's MenuItems array] for the item that was selected.
OnCreate
Called when this widget is created
Parameters:
- CreatedWidget - the widget that was created
- CreatorContainer - the container that created the widget
OnDoubleClick
Called when the widget has received a double-click input event. Not implemented by all widget types.
Parameters:
- EventObject - Object that issued the event.
- PlayerIndex - Player that performed the action that issued the event.
OnOpenContextMenu
Called when the user right-clicks (or whatever input key is configured to activate the ShowContextMenu UI input alias) this widget. Provides a way for widgets to customize the context menu that is used or prevent the context menu from being shown entirely.
For script customization of the context menu, a custom context menu object must be assigned to the CustomContextMenu variable. It is possible to provide data for the context menu without creating or modifying any existing data stores. First, get a reference to the scene's default context menu (GetScene()->GetDefaultContextMenu()). Add the desired elements to the scene's data store then bind the context menu to that data field.
Parameters:
- Sender - the widget that will be displaying the context menu
- PlayerIndex - index of the player that generated the input event that triggered the context menu display.
- CustomContextMenu - to provide a custom tooltip implementation, fill in in this value and return TRUE. The custom context menu will then be activated by native code.
Returns:
- return FALSE to prevent a context menu from being shown, including any from parent widgets. Return TRUE to indicate that the context menu for this widget can be displayed; if a value is not provided for CustomContextMenu, the default context menu will be displayed, using this widget's context menu data binding to generate the items.
OnPostSceneUpdate
Called immediately after the scene performs an update. Only called if assigned and the value of bEnableSceneUpdateNotifications is true.
OnPreSceneUpdate
Called immediately before the scene performs an update. Only called if assigned and the value of bEnableSceneUpdateNotifications is true.
OnPressed
Called when this widget is pressed. Not implemented by all widget types.
Parameters:
- EventObject - Object that issued the event.
- PlayerIndex - Player that performed the action that issued the event.
OnPressRelease
Called when the widget is no longer being pressed. Not implemented by all widget types.
Parameters:
- EventObject - Object that issued the event.
- PlayerIndex - Player that performed the action that issued the event.
OnPressRepeat
Called when the widget been pressed and the user is holding the button down. Not implemented by all widget types.
Parameters:
- EventObject - Object that issued the event.
- PlayerIndex - Player that performed the action that issued the event.
OnRefreshSubscriberValue
Called when this widget receives a call to RefreshSubscriberValue.
Parameters:
- Sender - the widget that is refreshing their value
- BindingIndex - optional parameter for indicating which data store binding is being refreshed, for those objects which have multiple data store bindings. How this parameter is used is up to the class which implements this interface, but typically the "primary" data store will be index 0, while values greater than FIRST_DEFAULT_DATABINDING_INDEX correspond to tooltips and context menus.
Returns:
- TRUE to indicate that this widget is going to refresh its value manually.
OnValueChanged
Called when the value of this UIObject is changed. Only called for widgets that contain data values.
Parameters:
- Sender - the UIObject whose value changed
- PlayerIndex - the index of the player that generated the call to this method; used as the PlayerIndex when activating UIEvents; if not specified, the value of GetBestPlayerIndex() is used instead.
Functions
Native functions
See UIObject native functions.
Other instance functions
ClearDockTargets
Wrapper method for resetting all docking links.
GetOwner
Returns the owner of this widget
GetParent
Overrides: UIScreenObject.GetParent
Returns the scene or widget that contains this widget in its Children array.
GetScene
Returns the scene that owns this widget
LogRenderBounds