My program doesn't have bugs. It just develops random features.

UE3:UIComp_DrawImage (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 06:48, 17 January 2010 by Wormbo (Talk | contribs) (1 revision: class descriptions for UDK January update (part 5))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> Component >> UIComponent >> UIComp_DrawComponents >> UIComp_DrawImage
Within class: 
Implemented interfaces
CustomPropertyItemHandler, UIStyleResolver
Direct subclasses:
UIComp_DrawTeamColoredImage, UIComp_UTDrawStateImage
This class in other games:

This component encapsulates rendering a UITexture for widgets. It is responsible for managing any image formatting data that is required for a particular widget (thus inappropriate for storage in UIStyles).

The style used for rendering the ImageRef is defined by whichever widget owns this component. It is the widget's responsibility to call ApplyImageStyle when the widget receives a call to OnStyleResolved for the UIStyleReference which is intended to be used as the style for this image.


Property group 'StyleOverride'[edit]


Type: UITexture

Modifiers: instanced, editinlineuse

The utility wrapper for the image that this component should render. Automatically created by the component when given an material/texture to render.


Type: UIRoot.UIImageStyleOverride

Contains values for customizing and overriding rendering and formatting values designated by this component's style.

Default value:

Member Value
Member Value
A 1.0
B 1.0
G 1.0
R 1.0
Member Value
AdjustmentType ADJUST_Normal
Member Value
AdjustmentType ADJUST_Normal
Member Value
Orientation UIORIENT_Vertical
Member Value
Orientation UIORIENT_Vertical
Opacity 1.0

Internal variables[edit]


Type: UIRoot.UIStyleReference

Modifiers: private

The style to use for rendering this component's image. If the style is invalid, the component will use the owning widget's PrimaryStyle, if possible.

Default value:

Member Value
DefaultStyleTag 'DefaultImageStyle'
RequiredStyleClass Class'Engine.UIStyle_Image'


Type: name

The tag used to fulfill the UIStyleResolver interface's GetStyleResolverTag method. Value should be set by the owning widget.

Default value: 'Image Style'

Native functions[edit]


native final function DisableCustomColor ()

Disables image color customization allowing the image to use the values from the applied style.


native final function DisableCustomCoordinates ()

Disables image coordinate customization allowing the image to use the values from the applied style.


native final function DisableCustomFormatting ()

Disables image formatting customization allowing the image to use the values from the applied style.


native final function DisableCustomOpacity ()

Disables the custom opacity level for this comp


native final function DisableCustomPadding ()

Disables the custom padding for this component.


native final noexport function UIStyle_Image GetAppliedImageStyle (optional UIState DesiredMenuState)

Returns the image style data being used by this image rendering component. If the component's ImageStyle is not set, the style data will be pulled from the owning widget's primary style.


  • DesiredMenuState - the menu state for the style data to retrieve; if not speicified, uses the owning widget's current menu state.


the image style data used to render this component's image for the specified menu state.

Note: noexport because we the native version is also handles optionally resolving the image style data from the active skin, so it takes a few more parameters.


native final function Surface GetImage () const

Returns the texture or material assigned to this component.


native final virtual function name GetStyleResolverTag ()

Specified by: UIStyleResolver.GetStyleResolverTag

Returns the tag assigned to this UIStyleResolver by the owning widget


native final virtual function bool NotifyResolveStyle (UISkin ActiveSkin, bool bClearExistingValue, optional UIState CurrentMenuState, const optional name StylePropertyName)

Specified by: UIStyleResolver.NotifyResolveStyle

Resolves the image style for this image rendering component.


  • ActiveSkin - the skin the use for resolving the style reference.
  • bClearExistingValue - if TRUE, style references will be invalidated first.
  • CurrentMenuState - the menu state to use for resolving the style data; if not specified, uses the current menu state of the owning widget.
  • StyleProperty - if specified, only the style reference corresponding to the specified property will be resolved; otherwise, all style references will be resolved.


native final function SetColor (Object.LinearColor NewColor)

Enables image color customization and changes the component's override color to the value specified.


  • NewColor - the color to use for rendering this component's image


native final function SetCoordinates (UIRoot.TextureCoordinates NewCoordinates)

Enables image coordinate customization and changes the component's override coordinates to the value specified.


  • NewCoordinates - the UV coordinates to use for rendering this component's image


native final function SetFormatting (UIRoot.EUIOrientation Orientation, UIRoot.UIImageAdjustmentData NewFormattingData)

Enables image formatting customization and changes the component's formatting override data to the value specified.


  • Orientation - indicates which orientation to modify
  • NewFormattingData - the new value to use for rendering this component's image.


native final function SetImage (Surface NewImage)

Changes the image for this component, creating the wrapper UITexture if necessary.


  • NewImage - the new texture or material to use in this component


native final function SetOpacity (float NewOpacity)

Enables a custom opacity and changes the component's override opacity to the value specified.


  • NewOpacity - the alpha to use for rendering this component's string


native final function SetPadding (float HorizontalPadding, float VerticalPadding)

Enables custom padding and changes the component's override padding to the value specified.


  • HorizontalPadding - new vertical padding value to use (assuming a screen height of DEFAULT_SIZE_Y); will be scaled based on actual resolution. Specify -1 to indicate that VerticalPadding should not be changed (useful when changing only the horizontal padding)


native final virtual function bool SetStyleResolverTag (name NewResolverTag)

Specified by: UIStyleResolver.SetStyleResolverTag

Changes the tag assigned to the UIStyleResolver to the specified value.


TRUE if the name was changed successfully; FALSE otherwise.