Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_UIInfo Interface Reference

Class used to hold UI information. More...

Inheritance diagram for SCR_UIInfo:
[legend]

Public Member Functions

ResourceName GetIconPath ()
 Get icon.
 
string GetIconSetName ()
 Returns Icon Set name if imageset.
 
bool HasIcon ()
 Check if the info has an icon defined.
 
bool SetIconTo (ImageWidget imageWidget)
 Set icon to given image widget.
 
override void Log (string prefix=string.Empty, LogLevel logLevel=LogLevel.VERBOSE)
 
- Public Member Functions inherited from SCR_UIDescription
LocalizedString GetUnformattedDescription ()
 Get the unformatted description from SCR_HintUIInfo instance.
 
void SetDescription (LocalizedString description)
 Change the description from SCR_HintUIInfo instance.
 
LocalizedString GetDescription ()
 Get description.
 
bool HasDescription ()
 Check if the info has a description defined.
 
bool SetDescriptionTo (TextWidget textWidget)
 Set description to given text widget.
 
override void Log (string prefix=string.Empty, LogLevel logLevel=LogLevel.VERBOSE)
 
- Public Member Functions inherited from SCR_UIName
LocalizedString GetUnformattedName ()
 Get The unformatted Name from SCR_HintUIInfo instance.
 
void SetName (LocalizedString name)
 Change the Name from SCR_HintUIInfo instance.
 
LocalizedString GetName ()
 Get name.
 
bool HasName ()
 Check if the info has a name defined.
 
bool SetNameTo (TextWidget textWidget)
 Set name to given text widget.
 
void Log (string prefix=string.Empty, LogLevel logLevel=LogLevel.VERBOSE)
 Print out contents of this UI info.
 

Static Public Member Functions

static SCR_UIInfo GetInfo (BaseContainer source, string varName)
 Get UIInfo from a source object.
 
static SCR_UIInfo CreateInfo (UIInfo source)
 Create SCR_UIInfo from engine UIInfo.
 
static SCR_UIInfo CreateInfo (LocalizedString name, LocalizedString description=LocalizedString.Empty, ResourceName icon=ResourceName.Empty, string iconSetName=string.Empty)
 Create SCR_UIInfo from basic params.
 
static SCR_UIInfo CreatePlaceholderInfo (TypeName type)
 Get placeholder info.
 

Protected Member Functions

override void CopyFrom (SCR_UIName source)
 
override void CopyFrom (SCR_UIName source)
 
void CopyFrom (SCR_UIName source)
 

Protected Attributes

ResourceName Icon
 
string IconSetName
 
- Protected Attributes inherited from SCR_UIDescription
LocalizedString Description
 
- Protected Attributes inherited from SCR_UIName
LocalizedString Name
 

Detailed Description

Class used to hold UI information.

Data are intentionally READ ONLY, because the class is often used on prefabs, not instances. Instead of adding SetXXX() functions here, consider using specialized inherited class. Inspired by engine-driven UIInfo, but not related to it.

See also
UIInfo

Member Function Documentation

◆ CopyFrom()

override void SCR_UIInfo.CopyFrom ( SCR_UIName  source)
protected

◆ CreateInfo() [1/2]

static SCR_UIInfo SCR_UIInfo.CreateInfo ( LocalizedString  name,
LocalizedString  description = LocalizedString::Empty,
ResourceName  icon = ResourceName::Empty,
string  iconSetName = string::Empty 
)
static

Create SCR_UIInfo from basic params.

Parameters
name
description
icon
iconSetName
Returns
SCR_UIInfo class

◆ CreateInfo() [2/2]

static SCR_UIInfo SCR_UIInfo.CreateInfo ( UIInfo  source)
static

Create SCR_UIInfo from engine UIInfo.

Parameters
sourceSource info
Returns
SCR_UIInfo class

◆ CreatePlaceholderInfo()

static SCR_UIInfo SCR_UIInfo.CreatePlaceholderInfo ( TypeName  type)
static

Get placeholder info.

Parameters
typeinherited from SCR_UIInfo
Returns
UIInfo class

◆ GetIconPath()

ResourceName SCR_UIInfo.GetIconPath ( )

Get icon.

When using it to fill ImageWIdget, use SetIconTo() if possible. Especially important since the image can point to image set instead of plain texture!

Returns
Image path

◆ GetIconSetName()

string SCR_UIInfo.GetIconSetName ( )

Returns Icon Set name if imageset.

Returns
string empty if not a image set

◆ GetInfo()

static SCR_UIInfo SCR_UIInfo.GetInfo ( BaseContainer  source,
string  varName 
)
static

Get UIInfo from a source object.

Parameters
sourceSource object, most commonly entity or component source
varNameVariable name of UIInfo
Returns
UIInfo class

◆ HasIcon()

bool SCR_UIInfo.HasIcon ( )

Check if the info has an icon defined.

Returns
True when the icon is defined

◆ Log()

override void SCR_UIInfo.Log ( string  prefix = string::Empty,
LogLevel  logLevel = LogLevel::VERBOSE 
)
Parameters
prefix
logLevel

Implements SCR_UIDescription.

◆ SetIconTo()

bool SCR_UIInfo.SetIconTo ( ImageWidget  imageWidget)

Set icon to given image widget.

Use this function instead of retrieving the texture using GetIconPath() and setting it manually! When the texture is an image set, manual setting would not work.

Parameters
imageWidgetTarget image widget
Returns
True when the image was set

Implemented in SCR_InventoryItemHintUIInfo.

Member Data Documentation

◆ Icon

ResourceName SCR_UIInfo.Icon
protected

◆ IconSetName

string SCR_UIInfo.IconSetName
protected

The documentation for this interface was generated from the following file: