I'm a doctor, not a mechanic

UE3:UISkin (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> UIRoot >> UIDataProvider >> UIDataStore >> UISkin
Package: 
Engine
Known classes within UISkin:
UIStyle
Direct subclass:
UICustomSkin
This class in other games:
UDK

Represents a collection of UIStyles.

When a style is created, it is assigned a persistent STYLE_ID. All styles for a particular widget are stored in a single unreal package file. The root object for this package is a UISkin object. The resources required by the style may also be stored in the skin file, or they might be located in another package.

A game UI is required to have at least one UISkin package that will serve as the default skin. Only one UISkin can be active at a time, and all custom UISkins are based on the default UISkin. Custom UISkins may decide to override a style completely by creating a new style that has the same STYLE_ID as the skin to be replaced, and placing that skin into the StyleLookupTable under that STYLE_ID. Any styles which aren't specifically overridden in the custom UISkin are inherited from the default skin. By default, widgets will automatically be mapped to the customized version of the UIStyle contained in the custom UISkin, but the user may choose to assign a completely different style to a particular widget. This only changes the style of that widget for that skin set and any UISkin that is based on the custom UISkin. Custom UISkins can be hierarchical, in that custom UISkins can be based on other custom UISkins. Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.

Properties

CursorMap

Type: Map{FName,struct FUIMouseCursor}

Modifiers: const, native, duplicatetransient

The cursors contained by this skin. Maps a unique tag (i.e. Arrow) to a cursor resource.

SoundCueMap

Type: Map{FName,class USoundCue*}

Modifiers: const, native, transient

Maps UI sound cue names to their corresponding sound cues. Used for quick lookup of USoundCues based on the UI sound cue name. Built at runtime from the SoundCues array.

SoundCues

Type: array<UISoundCue>

Modifiers: const, protected

the UI sound cues contained in this UISkin

StyleGroupMap

Type: Object.Map_Mirror{TLookupMap<FString>}

Modifiers: const, native, transient

Contains the style group names for this style and all parent styles.

StyleGroups

Type: array<string>

Modifiers: const, protected

The group names used by the styles in the skin package

StyleLookupTable

Type: Map{struct FSTYLE_ID,class UUIStyle*}

Modifiers: const, native, transient

maps STYLE_ID to the UIStyle that corresonds to that STYLE_ID. Used for quickly finding a UIStyle based on a STYLE_ID. Built at runtime as the UISkin serializes its list of styles

StyleNameMap

Type: Map{FName,class UUIStyle*}

Modifiers: const, native, transient

Maps StyleTag to the UIStyle that has that tag. Used for quickly finding a UIStyle based on a style tag. Built at runtime as the UISkin serializes its list of styles.

Styles

Type: array<UIStyle>

Modifiers: const, instanced, protected

the styles stored in this UISkin

Default values

Property Value
Tag 'Styles'

Structs

UISoundCue

Modifiers: native

Associates an arbitrary

name SoundName 
the name for this UISoundCue. this name is used by widgets to reference this sound, and must match

one of the values from the GameUISceneCient's list of available sound cue names

SoundCue SoundToPlay 
the actual sound that should be played

Native functions

AddStyleGroupName

native final function bool AddStyleGroupName (string StyleGroupName)

Adds a new style group to this skin.

Parameters:

  • StyleGroupName - the style group name to add

Returns:

TRUE if the group name was successfully added.

AddUISoundCue

native final function bool AddUISoundCue (name SoundCueName, SoundCue SoundToPlay)

Adds a new sound cue mapping to this skin's list of UI sound cues.

Parameters:

  • SoundCueName - the name to use for this UISoundCue. should correspond to one of the values of the UIInteraction.SoundCueNames array.
  • SoundToPlay - the sound cue that should be associated with this name; NULL values are OK.

Returns:

TRUE if the sound mapping was successfully added to this skin; FALSE if the specified name was invalid or wasn't found in the UIInteraction's array of available sound cue names.

FindStyleGroupIndex

native final function int FindStyleGroupIndex (string StyleGroupName) const

Finds the index for the specified group name.

Parameters:

  • StyleGroupName - the group name to find

Returns:

the index [into the skin's StyleGroupMap] for the specified style group, or INDEX_NONE if it wasn't found.

GetAvailableStyles

native final function GetAvailableStyles (out array<UIStyleout_Styles, optional bool bIncludeInheritedStyles)

Retrieve the list of styles available from this skin.

Parameters:

  • out_Styles - filled with the styles available from this UISkin, including styles contained by parent skins.
  • bIncludeInheritedStyles - if TRUE, out_Styles will also contain styles inherited from parent styles which aren't explicitely overridden in this skin

GetCursorResource

native final function UITexture GetCursorResource (name CursorName)

Looks up the cursor resource associated with the specified name in this skin's CursorMap.

Parameters:

  • CursorName - the name of the cursor to retrieve.

Returns:

a pointer to an instance of the resource associated with the cursor name specified, or NULL if no cursors exist that are using that name

GetSkinSoundCues

native final function GetSkinSoundCues (out array<UISoundCueout_SoundCues)

Retrieves the list of UISoundCues contained by this UISkin.

GetStyleGroupAtIndex

native final function string GetStyleGroupAtIndex (int Index) const

Gets the group name at the specified index

Parameters:

  • Index - the index [into the skin's StyleGroupMap] of the style to get

Returns:

the group name at the specified index, or an empty string if the index is invalid.

GetStyleGroups

native final function GetStyleGroups (out array<stringStyleGroupArray, optional bool bIncludeInheritedGroups) const

Retrieves the full list of style group names.

Parameters:

  • StyleGroupArray - recieves the array of group names
  • bIncludeInheritedGroupNames - specify FALSE to exclude group names inherited from base skins.

GetUISoundCue

native final function bool GetUISoundCue (name SoundCueName, out SoundCue out_UISoundCue)

Retrieves the SoundCue associated with the specified UISoundCue name.

Parameters:

  • SoundCueName - the name of the sound cue to find. should correspond to the SoundName for a UISoundCue contained by this skin
  • out_UISoundCue - will receive the value for the sound cue associated with the sound cue name specified; might be NULL if there is no actual sound cue associated with the sound cue name specified, or if this skin doesn't contain a sound cue using that name (use the return value to determine which of these is the case)

Returns:

TRUE if this skin contains a UISoundCue that is using the sound cue name specified, even if that sound cue name is not assigned to a sound cue object; FALSE if this skin doesn't contain a UISoundCue using the specified name.

IsInheritedGroupName

native final function bool IsInheritedGroupName (string StyleGroupName) const

Returns:

TRUE if the specified group name exists and was inherited from this skin's base skin; FALSE if the group name doesn't exist or belongs to this skin.

RemoveStyleGroupName

native final function bool RemoveStyleGroupName (string StyleGroupName)

Removes a style group name from this skin.

Parameters:

  • StyleGroupName - the group name to remove

Returns:

TRUE if this style group was successfully removed from this skin.

RemoveUISoundCue

native final function bool RemoveUISoundCue (name SoundCueName)

Removes the specified sound cue name from this skin's list of UISoundCues

Parameters:

  • SoundCueName - the name of the UISoundCue to remove. should correspond to one of the values of the UIInteraction.SoundCueNames array.

Returns:

TRUE if the sound mapping was successfully removed from this skin or this skin didn't contain any sound cues using that name;

RenameStyleGroup

native final function bool RenameStyleGroup (string OldStyleGroupName, string NewStyleGroupName)

Renames a style group in this skin.

Parameters:

  • OldStyleGroupName - the style group to rename
  • NewStyleGroupName - the new name to use for the style group

Returns:

TRUE if the style group was successfully renamed; FALSE if it wasn't found or couldn't be renamed.