Mostly Harmless
Difference between revisions of "UE3:UIObject (UT3)"
(test) |
(Auto-generated page) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{infobox class | {{infobox class | ||
| package = Engine | | package = Engine | ||
− | | | + | | parent1 = UIScreenObject |
− | + | | parent2 = UIRoot | |
− | + | | parent3 = Object | |
− | + | | abstract = yes | |
− | + | ||
}} | }} | ||
+ | {{autogenerated}} | ||
+ | Base class for all UI widgets. | ||
+ | |||
+ | Copyright 1998-2007 Epic Games, Inc. All Rights Reserved. | ||
+ | |||
+ | ==Constants== | ||
+ | ====FIRST_DEFAULT_DATABINDING_INDEX==== | ||
+ | '''Value:''' 100 | ||
+ | |||
+ | used to differentiate tooltip bindings from others | ||
+ | |||
+ | ====TOOLTIP_BINDING_INDEX==== | ||
+ | '''Value:''' 100 | ||
+ | |||
+ | <!-- enter constant description --> | ||
+ | |||
+ | ====CONTEXTMENU_BINDING_INDEX==== | ||
+ | '''Value:''' 101 | ||
+ | |||
+ | <!-- enter constant description --> | ||
+ | |||
+ | ==Properties== | ||
+ | ===Property group 'Data'=== | ||
+ | ====ContextMenuData==== | ||
+ | '''Type:''' {{tl|UIDataStoreBinding|UIRoot|structs}} | ||
+ | |||
+ | '''[[Variables#Modifiers|Modifiers]]:''' private, editconst | ||
+ | |||
+ | <!-- enter variable description --> | ||
+ | |||
+ | '''Default value:''' | ||
+ | {| class="list defaults" | ||
+ | ! {{tl|UIDataStoreBinding||UIRoot structs|Member}} | ||
+ | ! Value | ||
+ | |- | ||
+ | | RequiredFieldType | ||
+ | | {{tl|EUIDataProviderFieldType||UIRoot enums|DATATYPE_Collection}} | ||
+ | |} | ||
+ | |||
+ | ====ToolTip==== | ||
+ | '''Type:''' {{tl|UIDataStoreBinding|UIRoot|structs}} | ||
+ | |||
+ | '''[[Variables#Modifiers|Modifiers]]:''' private | ||
+ | |||
+ | The tool tip for this widget; only relevant for widgets that implement the UIDataStoreSubscriber interface. | ||
+ | |||
+ | ===Property group 'Debug'=== | ||
+ | ====bDebugShowBounds==== | ||
+ | '''Type:''' [[bool]] | ||
+ | |||
+ | Set to true to render an outline marking the widget's RenderBounds. | ||
+ | |||
+ | ====DebugBoundsColor==== | ||
+ | '''Type:''' {{tl|Color|Object|structs}} | ||
+ | |||
+ | if bRenderBoundingRegion is TRUE, specifies the color to use for this widget. | ||
+ | |||
+ | '''Default value:''' | ||
+ | {| class="list defaults" | ||
+ | ! {{tl|Color||Object structs|Member}} | ||
+ | ! Value | ||
+ | |- | ||
+ | | A | ||
+ | | 255 | ||
+ | |- | ||
+ | | B | ||
+ | | 255 | ||
+ | |- | ||
+ | | G | ||
+ | | 128 | ||
+ | |- | ||
+ | | R | ||
+ | | 255 | ||
+ | |} | ||
+ | |||
+ | ===Property group 'Focus'=== | ||
+ | ====NavigationTargets==== | ||
+ | '''Type:''' {{tl|UINavigationData|UIRoot|structs}} | ||
+ | |||
+ | Controls which widgets are given focus when this widget receives an event that changes | ||
+ | the currently focused widget. | ||
+ | |||
+ | ====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 'Presentation'=== | ||
+ | ====DockTargets==== | ||
+ | '''Type:''' {{tl|UIDockingSet|UIRoot|structs}} | ||
+ | |||
+ | '''[[Variables#Modifiers|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:''' | ||
+ | {| class="list defaults" | ||
+ | ! {{tl|UIDockingSet||UIRoot structs|Member}} | ||
+ | ! Value | ||
+ | |- | ||
+ | | TargetFace[0] | ||
+ | | {{tl|EUIWidgetFace||UIRoot enums|INVALID}} | ||
+ | |- | ||
+ | | TargetFace[1] | ||
+ | | {{tl|EUIWidgetFace||UIRoot enums|INVALID}} | ||
+ | |- | ||
+ | | TargetFace[2] | ||
+ | | {{tl|EUIWidgetFace||UIRoot enums|INVALID}} | ||
+ | |- | ||
+ | | TargetFace[3] | ||
+ | | {{tl|EUIWidgetFace||UIRoot enums|INVALID}} | ||
+ | |} | ||
+ | |||
+ | ====RenderBounds==== | ||
+ | '''Type:''' [[float]] | ||
+ | |||
+ | '''[[Static arrays|Array size]]:''' 4 (<code>{{tl|EUIWidgetFace||UIRoot enums}}.UIFACE_MAX</code>) | ||
+ | |||
+ | '''[[Variables#Modifiers|Modifiers]]:''' editconst, private, const, transient | ||
+ | |||
+ | Represents the bounding region available for the widget to render itself in. Set through the docking system. | ||
+ | |||
+ | ====RenderBoundsVertices==== | ||
+ | '''Type:''' {{tl|Vector2D|Object|structs}} | ||
+ | |||
+ | '''[[Static arrays|Array size]]:''' 4 (<code>{{tl|EUIWidgetFace||UIRoot enums}}.UIFACE_MAX</code>) | ||
+ | |||
+ | '''[[Variables#Modifiers|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:''' {{tl|Vector|Object|structs}} | ||
+ | |||
+ | Screenspace offset to apply to the widget's rendering. | ||
+ | |||
+ | ====Rotation==== | ||
+ | '''Type:''' {{tl|UIRotation|UIRoot|structs}} | ||
+ | |||
+ | Rotation of the widget. | ||
+ | |||
+ | '''Default value:''' | ||
+ | {| class="list defaults" | ||
+ | ! {{tl|UIRotation||UIRoot structs|Member}} | ||
+ | ! Value | ||
+ | |- | ||
+ | | AnchorPosition | ||
+ | | | ||
+ | {| class="list defaults" | ||
+ | ! {{tl|UIAnchorPosition||UIRoot structs|Member}} | ||
+ | ! Value | ||
+ | |- | ||
+ | | {{tl|UIScreenValue_Position||UIRoot structs|ScaleType}}[0] | ||
+ | | {{tl|EPositionEvalType||UIRoot enums|EVALPOS_PixelOwner}} | ||
+ | |- | ||
+ | | {{tl|UIScreenValue_Position||UIRoot structs|ScaleType}}[1] | ||
+ | | {{tl|EPositionEvalType||UIRoot enums|EVALPOS_PixelOwner}} | ||
+ | |} | ||
+ | |- | ||
+ | | AnchorType | ||
+ | | {{tl|ERotationAnchor||UIRoot enums|RA_Center}} | ||
+ | |} | ||
+ | |||
+ | ====WidgetTag==== | ||
+ | '''Type:''' [[name]] | ||
+ | |||
+ | '''[[Variables#Modifiers|Modifiers]]:''' editconst | ||
+ | |||
+ | Unique non-localized name for this widget which is used to reference the widget without needing to know its GUID | ||
+ | |||
+ | ===Internal variables=== | ||
+ | ====AnimationParent==== | ||
+ | '''Type:''' {{cl|UIObject}} | ||
+ | |||
+ | Used as the parent in animation sequences | ||
+ | |||
+ | ====AnimationPosition==== | ||
+ | '''Type:''' {{tl|Vector|Object|structs}} | ||
+ | |||
+ | '''[[Variables#Modifiers|Modifiers]]:''' transient | ||
+ | |||
+ | - The following is used in UTGame's UI animation system. | ||
+ | - It is subject to change at any time. | ||
+ | |||
+ | ====AnimStack==== | ||
+ | '''Type:''' [[array]]<{{tl|UIAnimSeqRef|UIAnimation}}> | ||
+ | |||
+ | '''[[Variables#Modifiers|Modifiers]]:''' transient | ||
+ | |||
+ | This is the stack of animations currently being applied to this UIObject | ||
+ | |||
+ | ====bEnableActiveCursorUpdates==== | ||
+ | '''Type:''' [[bool]] | ||
+ | |||
+ | '''[[Variables#Modifiers|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) | ||
+ | |||
+ | ====bSupportsPrimaryStyle==== | ||
+ | '''Type:''' [[bool]] | ||
+ | |||
+ | '''[[Variables#Modifiers|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:''' {{cl|UIObject}} | ||
+ | |||
+ | '''[[Variables#Modifiers|Modifiers]]:''' const, private, duplicatetransient | ||
+ | |||
+ | the UIObject that contains this widget in its Children array | ||
+ | |||
+ | ====OwnerScene==== | ||
+ | '''Type:''' {{cl|UIScene}} | ||
+ | |||
+ | '''[[Variables#Modifiers|Modifiers]]:''' const, private, duplicatetransient | ||
+ | |||
+ | The scene that owns this widget | ||
+ | |||
+ | ====PrimaryStyle==== | ||
+ | '''Type:''' {{tl|UIStyleReference|UIRoot|structs}} | ||
+ | |||
+ | Specifies the style data to use for this widget | ||
+ | |||
+ | '''Default value:''' | ||
+ | {| class="list defaults" | ||
+ | ! {{tl|UIStyleReference||UIRoot structs|Member}} | ||
+ | ! Value | ||
+ | |- | ||
+ | | DefaultStyleTag | ||
+ | | 'DefaultComboStyle' | ||
+ | |} | ||
+ | |||
+ | ====PrivateFlags==== | ||
+ | '''Type:''' [[int]] | ||
+ | |||
+ | '''[[Variables#Modifiers|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]]<{{cl|UIStyleResolver}}> | ||
+ | |||
+ | '''[[Variables#Modifiers|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:''' {{tl|WIDGET_ID|UIRoot|structs}} | ||
+ | |||
+ | '''[[Variables#Modifiers|Modifiers]]:''' noimport | ||
+ | |||
+ | Unique identifier for this widget | ||
+ | |||
+ | ===Default values=== | ||
+ | {| class="list defaults" | ||
+ | ! Property | ||
+ | ! Value | ||
+ | |- | ||
+ | | {{tl|EventProvider||UIScreenObject}} | ||
+ | | {{cl|UIComp_Event}}'{{tl|WidgetEventComponent}}' | ||
+ | |} | ||
+ | |||
+ | ===Subobjects=== | ||
+ | ====WidgetEventComponent==== | ||
+ | '''Class:''' {{cl|UIComp_Event|Engine}} | ||
+ | |||
+ | {| class="list defaults" | ||
+ | ! Property | ||
+ | ! Value | ||
+ | |- | ||
+ | | DefaultEvents[0] | ||
+ | | | ||
+ | {| class="list defaults" | ||
+ | ! {{tl|DefaultEventSpecification||UIRoot structs|Member}} | ||
+ | ! Value | ||
+ | |- | ||
+ | | EventTemplate | ||
+ | | {{cl|UIEvent_Initialized}}'Engine.Default__UIObject:WidgetInitializedEvent' | ||
+ | |} | ||
+ | |} | ||
+ | |||
+ | ==Delegates== | ||
+ | ====OnClicked==== | ||
+ | {{code|delegate [[bool]] '''OnClicked''' ({{cl|UIScreenObject}} '''EventObject''', [[int]] '''PlayerIndex''')}} | ||
+ | |||
+ | 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==== | ||
+ | {{code|delegate [[bool]] '''OnCloseContextMenu''' ({{cl|UIContextMenu}} '''ContextMenu''', [[int]] '''PlayerIndex''')}} | ||
+ | |||
+ | 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==== | ||
+ | {{code|delegate '''OnContextMenuItemSelected''' ({{cl|UIContextMenu}} '''ContextMenu''', [[int]] '''PlayerIndex''', [[int]] '''ItemIndex''')}} | ||
+ | |||
+ | 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==== | ||
+ | {{code|delegate '''OnCreate''' ({{cl|UIObject}} '''CreatedWidget''', {{cl|UIScreenObject}} '''CreatorContainer''')}} | ||
+ | |||
+ | Called when this widget is created | ||
+ | |||
+ | '''Parameters:''' | ||
+ | * ''CreatedWidget'' - the widget that was created | ||
+ | * ''CreatorContainer'' - the container that created the widget | ||
+ | |||
+ | ====OnDoubleClick==== | ||
+ | {{code|delegate '''OnDoubleClick''' ({{cl|UIScreenObject}} '''EventObject''', [[int]] '''PlayerIndex''')}} | ||
+ | |||
+ | 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==== | ||
+ | {{code|delegate [[bool]] '''OnOpenContextMenu''' ({{cl|UIObject}} '''Sender''', [[int]] '''PlayerIndex''', out {{cl|UIContextMenu}} '''CustomContextMenu''')}} | ||
+ | |||
+ | 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. | ||
+ | |||
+ | ====OnPressed==== | ||
+ | {{code|delegate '''OnPressed''' ({{cl|UIScreenObject}} '''EventObject''', [[int]] '''PlayerIndex''')}} | ||
+ | |||
+ | 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==== | ||
+ | {{code|delegate '''OnPressRelease''' ({{cl|UIScreenObject}} '''EventObject''', [[int]] '''PlayerIndex''')}} | ||
+ | |||
+ | 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==== | ||
+ | {{code|delegate '''OnPressRepeat''' ({{cl|UIScreenObject}} '''EventObject''', [[int]] '''PlayerIndex''')}} | ||
+ | |||
+ | 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. | ||
+ | |||
+ | ====OnQueryToolTip==== | ||
+ | {{code|delegate [[bool]] '''OnQueryToolTip''' ({{cl|UIObject}} '''Sender''', out {{cl|UIToolTip}} '''CustomToolTip''')}} | ||
+ | |||
+ | Called when this widget (or one of its children) becomes the ActiveControl. Provides a way for child classes or | ||
+ | containers to easily override or short-circuit the standard tooltip that is normally shown. If this delegate is | ||
+ | not assigned to any function, the default tool-tip will be displayed if this widget has a data store binding property | ||
+ | named "ToolTipBinding" which is bound to a valid data store. | ||
+ | |||
+ | '''Parameters:''' | ||
+ | * ''Sender'' - the widget that will be displaying the tooltip | ||
+ | * ''CustomToolTip'' - to provide a custom tooltip implementation, fill in in this value and return TRUE. The custom tool tip object will then be activated by native code. | ||
+ | |||
+ | '''Returns:''' | ||
+ | :return FALSE to prevent any tool-tips from being shown, including parents. | ||
+ | |||
+ | ====OnRefreshSubscriberValue==== | ||
+ | {{code|delegate [[bool]] '''OnRefreshSubscriberValue''' ({{cl|UIObject}} '''Sender''', [[int]] '''BindingIndex''')}} | ||
+ | |||
+ | 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. | ||
+ | |||
+ | ====OnUIAnimEnd==== | ||
+ | {{code|delegate '''OnUIAnimEnd''' ({{cl|UIObject}} '''AnimTarget''', [[int]] '''AnimIndex''', {{cl|UIAnimationSeq}} '''AnimSeq''')}} | ||
+ | |||
+ | If set, this delegate is called whenever an animation is finished | ||
+ | |||
+ | ====OnValueChanged==== | ||
+ | {{code|delegate '''OnValueChanged''' ({{cl|UIObject}} '''Sender''', [[int]] '''PlayerIndex''')}} | ||
+ | |||
+ | 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 {{cl|UIObject native functions}}. | ||
+ | |||
+ | ===Events=== | ||
+ | ====ClearUIAnimation==== | ||
+ | {{code|event '''ClearUIAnimation''' ([[name]] '''AnimName''', optional {{cl|UIAnimationSeq}} '''AnimSeq''')}} | ||
+ | |||
+ | Clears the animation from the stack. Stopping an animation (either naturally or by | ||
+ | force) doesn't remove the effects. In those cases you need to clear the animation | ||
+ | from the stack. | ||
+ | |||
+ | NOTE: This only affects position and rotation animations. All other animations | ||
+ | are destructive and can't be easilly reset. | ||
+ | |||
+ | '''Parameters:''' | ||
+ | * ''AnimName'' - The Name of the animation to play | ||
+ | * ''AnimSeq'' - Optional sequence to use. In case you don't know the name | ||
+ | |||
+ | ====PlayUIAnimation==== | ||
+ | {{code|event '''PlayUIAnimation''' ([[name]] '''AnimName''', optional {{cl|UIAnimationSeq}} '''AnimSeqTemplate''', optional [[float]] '''PlaybackRate''', optional [[bool]] '''bLoop''', optional [[float]] '''InitialPosition''')}} | ||
+ | |||
+ | Play an animation on this UIObject | ||
+ | |||
+ | '''Parameters:''' | ||
+ | * ''AnimName'' - The Name of the Animation to play | ||
+ | * ''AnimSeq'' - Optional, A Sequence Template. If that's set, we use it instead | ||
+ | * ''PlaybackRate'' - Optional, How fast to play back the sequence | ||
+ | * ''InitialPosition'' - Optional, Where in the sequence should we start | ||
+ | |||
+ | ====StopUIAnimation==== | ||
+ | {{code|event '''StopUIAnimation''' ([[name]] '''AnimName''', optional {{cl|UIAnimationSeq}} '''AnimSeq''', optional [[bool]] '''bFinalize''')}} | ||
+ | |||
+ | Stop an animation that is playing. | ||
+ | |||
+ | '''Parameters:''' | ||
+ | * ''AnimName'' - The Name of the animation to play | ||
+ | * ''AnimSeq'' - Optional sequence to use. In case you don't know the name | ||
+ | * ''bFinalize'' - If true, we will force the end frame | ||
+ | |||
+ | ====UIAnimEnd==== | ||
+ | {{code|event '''UIAnimEnd''' ([[int]] '''SeqIndex''')}} | ||
+ | |||
+ | AnimEnd is always called when an animation stops playing either by ending, or | ||
+ | when StopAnim is called on it. It's responsible for unsubscribing from the scene client | ||
+ | and performing any housekeeping | ||
+ | |||
+ | ===Other instance functions=== | ||
+ | ====GetOwner==== | ||
+ | {{code|final function {{cl|UIObject}} '''GetOwner''' ()}} | ||
+ | |||
+ | Returns the owner of this widget | ||
+ | |||
+ | ====GetParent==== | ||
+ | {{code|function {{cl|UIScreenObject}} '''GetParent''' ()}} | ||
+ | |||
+ | '''Overrides:''' {{tl|GetParent|UIScreenObject}} | ||
+ | |||
+ | Returns the scene or widget that contains this widget in its Children array. | ||
+ | |||
+ | ====GetScene==== | ||
+ | {{code|final function {{cl|UIScene}} '''GetScene''' ()}} | ||
+ | |||
+ | Returns the scene that owns this widget | ||
+ | |||
+ | ====LogRenderBounds==== | ||
+ | {{code|function '''LogRenderBounds''' ([[int]] '''Indent''')}} | ||
+ | |||
+ | <!-- enter function description --> | ||
+ | |||
+ | ====OnSetDatastoreBinding==== | ||
+ | {{code|function '''OnSetDatastoreBinding''' ({{cl|UIAction_SetDatastoreBinding}} '''Action''')}} | ||
+ | |||
+ | Kismet Action Handlers |
Latest revision as of 09:11, 17 May 2008
Object >> UIRoot >> UIScreenObject >> UIObject |
- Package:
- Engine
- Known classes within UIObject:
- UIComp_DrawComponents, UIComp_DrawImage, UIComp_DrawString, UIComp_AutoAlignment, UIComp_DrawCaption, UIComp_DrawStringSlider, UIComp_DrawTeamColoredImage, UIComp_UTDrawStateImage, UIComp_UTGlowString
- Direct subclasses:
- UIComboBox, UIOptionListBase, UIProgressBar, UIImage, UIMeshWidget, UIButton, ConsoleEntry, UIContainer, UIEditBox, UILabel, UIList, UIPrefabInstance, UIPrefab, UIScrollbar, UISlider, UITabControl, UTUI_Widget
- 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. |
Base class for all UI widgets.
Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
Constants[edit]
FIRST_DEFAULT_DATABINDING_INDEX[edit]
Value: 100
used to differentiate tooltip bindings from others
TOOLTIP_BINDING_INDEX[edit]
Value: 100
CONTEXTMENU_BINDING_INDEX[edit]
Value: 101
Properties[edit]
Property group 'Data'[edit]
ContextMenuData[edit]
Type: UIRoot.UIDataStoreBinding
Modifiers: private, editconst
Default value:
Member | Value |
---|---|
RequiredFieldType | DATATYPE_Collection |
ToolTip[edit]
Type: UIRoot.UIDataStoreBinding
Modifiers: private
The tool tip for this widget; only relevant for widgets that implement the UIDataStoreSubscriber interface.
Property group 'Debug'[edit]
bDebugShowBounds[edit]
Type: bool
Set to true to render an outline marking the widget's RenderBounds.
DebugBoundsColor[edit]
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 |
Property group 'Focus'[edit]
[edit]
Type: UIRoot.UINavigationData
Controls which widgets are given focus when this widget receives an event that changes the currently focused widget.
TabIndex[edit]
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 'Presentation'[edit]
DockTargets[edit]
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[edit]
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[edit]
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[edit]
Type: Object.Vector
Screenspace offset to apply to the widget's rendering.
Rotation[edit]
Type: UIRoot.UIRotation
Rotation of the widget.
Default value:
Member | Value | ||||||
---|---|---|---|---|---|---|---|
AnchorPosition |
|
||||||
AnchorType | RA_Center |
WidgetTag[edit]
Type: name
Modifiers: editconst
Unique non-localized name for this widget which is used to reference the widget without needing to know its GUID
Internal variables[edit]
AnimationParent[edit]
Type: UIObject
Used as the parent in animation sequences
AnimationPosition[edit]
Type: Object.Vector
Modifiers: transient
- The following is used in UTGame's UI animation system. - It is subject to change at any time.
AnimStack[edit]
Type: array<UIAnimation.UIAnimSeqRef>
Modifiers: transient
This is the stack of animations currently being applied to this UIObject
bEnableActiveCursorUpdates[edit]
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)
bSupportsPrimaryStyle[edit]
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[edit]
Type: UIObject
Modifiers: const, private, duplicatetransient
the UIObject that contains this widget in its Children array
OwnerScene[edit]
Type: UIScene
Modifiers: const, private, duplicatetransient
The scene that owns this widget
PrimaryStyle[edit]
Type: UIRoot.UIStyleReference
Specifies the style data to use for this widget
Default value:
Member | Value |
---|---|
DefaultStyleTag | 'DefaultComboStyle' |
PrivateFlags[edit]
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[edit]
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[edit]
Type: UIRoot.WIDGET_ID
Modifiers: noimport
Unique identifier for this widget
Default values[edit]
Property | Value |
---|---|
EventProvider | UIComp_Event'WidgetEventComponent' |
Subobjects[edit]
WidgetEventComponent[edit]
Class: Engine.UIComp_Event
Property | Value | ||||
---|---|---|---|---|---|
DefaultEvents[0] |
|
Delegates[edit]
OnClicked[edit]
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[edit]
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[edit]
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[edit]
Called when this widget is created
Parameters:
- CreatedWidget - the widget that was created
- CreatorContainer - the container that created the widget
OnDoubleClick[edit]
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[edit]
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.
OnPressed[edit]
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[edit]
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[edit]
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.
OnQueryToolTip[edit]
Called when this widget (or one of its children) becomes the ActiveControl. Provides a way for child classes or containers to easily override or short-circuit the standard tooltip that is normally shown. If this delegate is not assigned to any function, the default tool-tip will be displayed if this widget has a data store binding property named "ToolTipBinding" which is bound to a valid data store.
Parameters:
- Sender - the widget that will be displaying the tooltip
- CustomToolTip - to provide a custom tooltip implementation, fill in in this value and return TRUE. The custom tool tip object will then be activated by native code.
Returns:
- return FALSE to prevent any tool-tips from being shown, including parents.
OnRefreshSubscriberValue[edit]
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.
OnUIAnimEnd[edit]
If set, this delegate is called whenever an animation is finished
OnValueChanged[edit]
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[edit]
Native functions[edit]
See UIObject native functions.
Events[edit]
ClearUIAnimation[edit]
Clears the animation from the stack. Stopping an animation (either naturally or by force) doesn't remove the effects. In those cases you need to clear the animation from the stack.
NOTE: This only affects position and rotation animations. All other animations are destructive and can't be easilly reset.
Parameters:
- AnimName - The Name of the animation to play
- AnimSeq - Optional sequence to use. In case you don't know the name
PlayUIAnimation[edit]
Play an animation on this UIObject
Parameters:
- AnimName - The Name of the Animation to play
- AnimSeq - Optional, A Sequence Template. If that's set, we use it instead
- PlaybackRate - Optional, How fast to play back the sequence
- InitialPosition - Optional, Where in the sequence should we start
StopUIAnimation[edit]
Stop an animation that is playing.
Parameters:
- AnimName - The Name of the animation to play
- AnimSeq - Optional sequence to use. In case you don't know the name
- bFinalize - If true, we will force the end frame
UIAnimEnd[edit]
AnimEnd is always called when an animation stops playing either by ending, or when StopAnim is called on it. It's responsible for unsubscribing from the scene client and performing any housekeeping
Other instance functions[edit]
GetOwner[edit]
Returns the owner of this widget
GetParent[edit]
Overrides: UIScreenObject.GetParent
Returns the scene or widget that contains this widget in its Children array.
GetScene[edit]
Returns the scene that owns this widget
LogRenderBounds[edit]
OnSetDatastoreBinding[edit]
Kismet Action Handlers