I don't need to test my programs. I have an error-correcting modem.

Difference between revisions of "UE3:UIComp DrawImage (UT3)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(testing wikifier output)
(Talk)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{infobox class
 
{{infobox class
 
| package = Engine
 
| package = Engine
| parent1 = Object
+
| parent1 = UIComp_DrawComponents
| parent2 = Component
+
| parent2 = UIComponent
| parent3 = UIComponent
+
| parent3 = Component
| parent4 = UIComp_DrawComponents
+
| parent4 = Object
 
| within = UIObject
 
| within = UIObject
 
| interface1 = CustomPropertyItemHandler
 
| interface1 = CustomPropertyItemHandler
 
| interface2 = UIStyleResolver
 
| interface2 = UIStyleResolver
 
}}
 
}}
; Known Subclasses : [[{{samegame|UIComp_DrawTeamColoredImage}}|UTGame.UIComp_DrawTeamColoredImage]], [[{{samegame|UIComp_UTDrawStateImage}}|UTGame.UIComp_UTDrawStateImage]]
 
 
{{autogenerated}}
 
{{autogenerated}}
 
This component encapsulates rendering a UITexture for widgets.  It is responsible for managing any
 
This component encapsulates rendering a UITexture for widgets.  It is responsible for managing any
Line 23: Line 22:
 
===Property group 'StyleOverride'===
 
===Property group 'StyleOverride'===
 
====ImageRef====
 
====ImageRef====
{| class="list"
+
'''Type:''' {{cl|UITexture}}
! Type:
+
 
| [[{{samegame|UITexture}}|UITexture]]
+
'''[[Variables#Modifiers|Modifiers]]:''' instanced, editinlineuse
|-
+
 
! [[Variables#Modifiers|Modifiers]]:
+
| instanced, editinlineuse
+
|}
+
 
The utility wrapper for the image that this component should render.  Automatically created by the component when
 
The utility wrapper for the image that this component should render.  Automatically created by the component when
 
given an material/texture to render.
 
given an material/texture to render.
  
 
====StyleCustomization====
 
====StyleCustomization====
{| class="list"
+
'''Type:''' {{tl|UIImageStyleOverride|UIRoot|structs}}
! Type:
+
 
| UIImageStyleOverride
+
|}
+
 
Contains values for customizing and overriding rendering and formatting values designated by this component's style.
 
Contains values for customizing and overriding rendering and formatting values designated by this component's style.
  
===Internal variables===
+
'''Default value:'''
====ImageStyle====
+
{| class="list defaults"
{| class="list"
+
! {{tl|UIImageStyleOverride||UIRoot structs|Member}}
! Type:
+
! Value
| UIStyleReference
+
 
|-
 
|-
! [[Variables#Modifiers|Modifiers]]:
+
| {{tl|UIStyleOverride||UIRoot structs|DrawColor}}
| private
+
|
 +
{| class="list defaults"
 +
! {{tl|LinearColor||Object structs|Member}}
 +
! Value
 +
|-
 +
| A
 +
| 1.0
 +
|-
 +
| B
 +
| 1.0
 +
|-
 +
| G
 +
| 1.0
 +
|-
 +
| R
 +
| 1.0
 
|}
 
|}
 +
|-
 +
| Formatting[0]
 +
|
 +
{| class="list defaults"
 +
! {{tl|UIImageAdjustmentData||UIRoot structs|Member}}
 +
! Value
 +
|-
 +
| AdjustmentType
 +
| {{tl|EMaterialAdjustmentType||UIRoot enums|ADJUST_Normal}}
 +
|}
 +
|-
 +
| Formatting[1]
 +
|
 +
{| class="list defaults"
 +
! {{tl|UIImageAdjustmentData||UIRoot structs|Member}}
 +
! Value
 +
|-
 +
| AdjustmentType
 +
| {{tl|EMaterialAdjustmentType||UIRoot enums|ADJUST_Normal}}
 +
|}
 +
|-
 +
| {{tl|UIStyleOverride||UIRoot structs|Opacity}}
 +
| 1.0
 +
|}
 +
 +
===Internal variables===
 +
====ImageStyle====
 +
'''Type:''' {{tl|UIStyleReference|UIRoot|structs}}
 +
 +
'''[[Variables#Modifiers|Modifiers]]:''' private
 +
 
The style to use for rendering this component's image.  If the style is invalid, the component will use the owning
 
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.
 
widget's PrimaryStyle, if possible.
  
====StyleResolverTag====
+
'''Default value:'''
{| class="list"
+
{| class="list defaults"
! Type:
+
! {{tl|UIStyleReference||UIRoot structs|Member}}
| [[name]]
+
! Value
 +
|-
 +
| DefaultStyleTag
 +
| 'DefaultImageStyle'
 +
|-
 +
| RequiredStyleClass
 +
| [[Types#Class|Class]]'{{cl|UIStyle_Image|Engine}}'
 
|}
 
|}
 +
 +
====StyleResolverTag====
 +
'''Type:''' [[name]]
 +
 
The tag used to fulfill the UIStyleResolver interface's GetStyleResolverTag method.  Value should be set by the owning widget.
 
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==
 
==Native functions==
 
====DisableCustomColor====
 
====DisableCustomColor====
native final function '''DisableCustomColor''' ()
+
{{code|native final function '''DisableCustomColor''' ()}}
 +
 
 
Disables image color customization allowing the image to use the values from the applied style.
 
Disables image color customization allowing the image to use the values from the applied style.
  
 
====DisableCustomCoordinates====
 
====DisableCustomCoordinates====
native final function '''DisableCustomCoordinates''' ()
+
{{code|native final function '''DisableCustomCoordinates''' ()}}
 +
 
 
Disables image coordinate customization allowing the image to use the values from the applied style.
 
Disables image coordinate customization allowing the image to use the values from the applied style.
  
 
====DisableCustomFormatting====
 
====DisableCustomFormatting====
native final function '''DisableCustomFormatting''' ()
+
{{code|native final function '''DisableCustomFormatting''' ()}}
 +
 
 
Disables image formatting customization allowing the image to use the values from the applied style.
 
Disables image formatting customization allowing the image to use the values from the applied style.
  
 
====DisableCustomOpacity====
 
====DisableCustomOpacity====
native final function '''DisableCustomOpacity''' ()
+
{{code|native final function '''DisableCustomOpacity''' ()}}
 +
 
 
Disables the custom opacity level for this comp
 
Disables the custom opacity level for this comp
  
 
====DisableCustomPadding====
 
====DisableCustomPadding====
native final function '''DisableCustomPadding''' ()
+
{{code|native final function '''DisableCustomPadding''' ()}}
 +
 
 
Disables the custom padding for this component.
 
Disables the custom padding for this component.
  
 
====GetAppliedImageStyle====
 
====GetAppliedImageStyle====
native final noexport function [[{{samegame|UIStyle_Image}}|UIStyle_Image]] '''GetAppliedImageStyle''' (optional [[{{samegame|UIState}}|UIState]] '''DesiredMenuState''')
+
{{code|native final noexport function {{cl|UIStyle_Image}} '''GetAppliedImageStyle''' (optional {{cl|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
 
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.
 
will be pulled from the owning widget's primary style.
  
 
'''Parameters:'''
 
'''Parameters:'''
* ''DesiredMenuState'' - the menu state for the style data to retrieve; if not speicified, uses the owning widget's current menu state.
+
* ''DesiredMenuState'' - the menu state for the style data to retrieve; if not speicified, uses the owning widget's current menu state.  
  
 
'''Returns:'''
 
'''Returns:'''
 
:the image style data used to render this component's image for the specified 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.
+
'''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.
  
 
====GetImage====
 
====GetImage====
native final function [[{{samegame|Surface}}|Surface]] '''GetImage''' () const
+
{{code|native final function {{cl|Surface}} '''GetImage''' () const}}
 +
 
 
Returns the texture or material assigned to this component.
 
Returns the texture or material assigned to this component.
  
 
====GetStyleResolverTag====
 
====GetStyleResolverTag====
native final virtual function [[name]] '''GetStyleResolverTag''' ()
+
{{code|native final virtual function [[name]] '''GetStyleResolverTag''' ()}}
{| class="list"
+
 
|-
+
'''Specified by:''' {{tl|GetStyleResolverTag|UIStyleResolver}}
! Specified by:
+
 
| [[{{samegame|UIStyleResolver}}#GetStyleResolverTag|UIStyleResolver.GetStyleResolverTag]]
+
|}
+
 
Returns the tag assigned to this UIStyleResolver by the owning widget
 
Returns the tag assigned to this UIStyleResolver by the owning widget
  
 
====NotifyResolveStyle====
 
====NotifyResolveStyle====
native final virtual function [[bool]] '''NotifyResolveStyle''' ([[{{samegame|UISkin}}|UISkin]] '''ActiveSkin''', [[bool]] '''bClearExistingValue''', optional [[{{samegame|UIState}}|UIState]] '''CurrentMenuState''', const optional [[name]] '''StylePropertyName''')
+
{{code|native final virtual function [[bool]] '''NotifyResolveStyle''' ({{cl|UISkin}} '''ActiveSkin''', [[bool]] '''bClearExistingValue''', optional {{cl|UIState}} '''CurrentMenuState''', const optional [[name]] '''StylePropertyName''')}}
{| class="list"
+
 
|-
+
'''Specified by:''' {{tl|NotifyResolveStyle|UIStyleResolver}}
! Specified by:
+
 
| [[{{samegame|UIStyleResolver}}#NotifyResolveStyle|UIStyleResolver.NotifyResolveStyle]]
+
|}
+
 
Resolves the image style for this image rendering component.
 
Resolves the image style for this image rendering component.
  
Line 122: Line 176:
  
 
====SetColor====
 
====SetColor====
native final function '''SetColor''' ([[{{samegame|Object structs}}#LinearColor|Object.LinearColor]] '''NewColor''')
+
{{code|native final function '''SetColor''' ({{tl|LinearColor|Object|structs}} '''NewColor''')}}
 +
 
 
Enables image color customization and changes the component's override color to the value specified.
 
Enables image color customization and changes the component's override color to the value specified.
  
Line 129: Line 184:
  
 
====SetCoordinates====
 
====SetCoordinates====
native final function '''SetCoordinates''' (TextureCoordinates '''NewCoordinates''')
+
{{code|native final function '''SetCoordinates''' ({{tl|TextureCoordinates|UIRoot|structs}} '''NewCoordinates''')}}
 +
 
 
Enables image coordinate customization and changes the component's override coordinates to the value specified.
 
Enables image coordinate customization and changes the component's override coordinates to the value specified.
  
Line 136: Line 192:
  
 
====SetFormatting====
 
====SetFormatting====
native final function '''SetFormatting''' (EUIOrientation '''Orientation''', UIImageAdjustmentData '''NewFormattingData''')
+
{{code|native final function '''SetFormatting''' ({{tl|EUIOrientation|UIRoot|enums}} '''Orientation''', {{tl|UIImageAdjustmentData|UIRoot|structs}} '''NewFormattingData''')}}
 +
 
 
Enables image formatting customization and changes the component's formatting override data to the value specified.
 
Enables image formatting customization and changes the component's formatting override data to the value specified.
  
Line 144: Line 201:
  
 
====SetImage====
 
====SetImage====
native final function '''SetImage''' ([[{{samegame|Surface}}|Surface]] '''NewImage''')
+
{{code|native final function '''SetImage''' ({{cl|Surface}} '''NewImage''')}}
 +
 
 
Changes the image for this component, creating the wrapper UITexture if necessary.
 
Changes the image for this component, creating the wrapper UITexture if necessary.
  
Line 151: Line 209:
  
 
====SetOpacity====
 
====SetOpacity====
native final function '''SetOpacity''' ([[float]] '''NewOpacity''')
+
{{code|native final function '''SetOpacity''' ([[float]] '''NewOpacity''')}}
 +
 
 
Enables a custom opacity and changes the component's override opacity to the value specified.
 
Enables a custom opacity and changes the component's override opacity to the value specified.
  
Line 158: Line 217:
  
 
====SetPadding====
 
====SetPadding====
native final function '''SetPadding''' ([[float]] '''HorizontalPadding''', [[float]] '''VerticalPadding''')
+
{{code|native final function '''SetPadding''' ([[float]] '''HorizontalPadding''', [[float]] '''VerticalPadding''')}}
 +
 
 
Enables custom padding and changes the component's override padding to the value specified.
 
Enables custom padding and changes the component's override padding to the value specified.
  
Line 165: Line 225:
  
 
====SetStyleResolverTag====
 
====SetStyleResolverTag====
native final virtual function [[bool]] '''SetStyleResolverTag''' ([[name]] '''NewResolverTag''')
+
{{code|native final virtual function [[bool]] '''SetStyleResolverTag''' ([[name]] '''NewResolverTag''')}}
{| class="list"
+
 
|-
+
'''Specified by:''' {{tl|SetStyleResolverTag|UIStyleResolver}}
! Specified by:
+
 
| [[{{samegame|UIStyleResolver}}#SetStyleResolverTag|UIStyleResolver.SetStyleResolverTag]]
+
|}
+
 
Changes the tag assigned to the UIStyleResolver to the specified value.
 
Changes the tag assigned to the UIStyleResolver to the specified value.
  
 
'''Returns:'''
 
'''Returns:'''
 
:TRUE if the name was changed successfully; FALSE otherwise.
 
:TRUE if the name was changed successfully; FALSE otherwise.

Latest revision as of 08:40, 23 May 2008

UT3 Object >> Component >> UIComponent >> UIComp_DrawComponents >> UIComp_DrawImage
Package: 
Engine
Within class: 
UIObject
Implemented interfaces
CustomPropertyItemHandler, UIStyleResolver
Direct subclasses:
UIComp_DrawTeamColoredImage, UIComp_UTDrawStateImage
This class in other games:
UDK

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.

Copyright 1998-2007 Epic Games, Inc. All Rights Reserved

Properties[edit]

Property group 'StyleOverride'[edit]

ImageRef[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.

StyleCustomization[edit]

Type: UIRoot.UIImageStyleOverride

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

Default value:

Member Value
DrawColor
Member Value
A 1.0
B 1.0
G 1.0
R 1.0
Formatting[0]
Member Value
AdjustmentType ADJUST_Normal
Formatting[1]
Member Value
AdjustmentType ADJUST_Normal
Opacity 1.0

Internal variables[edit]

ImageStyle[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'

StyleResolverTag[edit]

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]

DisableCustomColor[edit]

native final function DisableCustomColor ()

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

DisableCustomCoordinates[edit]

native final function DisableCustomCoordinates ()

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

DisableCustomFormatting[edit]

native final function DisableCustomFormatting ()

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

DisableCustomOpacity[edit]

native final function DisableCustomOpacity ()

Disables the custom opacity level for this comp

DisableCustomPadding[edit]

native final function DisableCustomPadding ()

Disables the custom padding for this component.

GetAppliedImageStyle[edit]

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.

Parameters:

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

Returns:

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.

GetImage[edit]

native final function Surface GetImage () const

Returns the texture or material assigned to this component.

GetStyleResolverTag[edit]

native final virtual function name GetStyleResolverTag ()

Specified by: UIStyleResolver.GetStyleResolverTag

Returns the tag assigned to this UIStyleResolver by the owning widget

NotifyResolveStyle[edit]

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.

Parameters:

  • 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.

SetColor[edit]

native final function SetColor (Object.LinearColor NewColor)

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

Parameters:

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

SetCoordinates[edit]

native final function SetCoordinates (UIRoot.TextureCoordinates NewCoordinates)

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

Parameters:

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

SetFormatting[edit]

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.

Parameters:

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

SetImage[edit]

native final function SetImage (Surface NewImage)

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

Parameters:

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

SetOpacity[edit]

native final function SetOpacity (float NewOpacity)

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

Parameters:

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

SetPadding[edit]

native final function SetPadding (float HorizontalPadding, float VerticalPadding)

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

Parameters:

  • 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)

SetStyleResolverTag[edit]

native final virtual function bool SetStyleResolverTag (name NewResolverTag)

Specified by: UIStyleResolver.SetStyleResolverTag

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

Returns:

TRUE if the name was changed successfully; FALSE otherwise.