reckfellENGINE

Theme

A resource containing UI appearance items.

On this page
class ThemeReckfellSharpInherits Resource

Theme stores colors, constants, fonts, font sizes, textures, StyleBoxes and sounds by item name and type. Assign it to a root Control; descendants can add local themes and overrides.

Control lookup visits the nearest theme owner before ancestors, with variation/type lookup inside each theme. Thus a nearer Button item can override an ancestor ActionButton item. Theme Get methods read the resource itself and do not traverse the Control hierarchy.

Working example.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

ThemeConstructor
# Theme
C#
public Theme();

Properties3

DefaultBaseScaleProperty
# DefaultBaseScale
C#
public float DefaultBaseScale { get; set; }

The default base scale factor of this theme resource. Used by some controls to scale their visual properties based on the global scale factor. If this value is set to 0.0, the global scale factor is used (see ThemeDB.FallbackBaseScale). Use Theme.HasDefaultBaseScale to check if this value is valid.

DefaultFontProperty
# DefaultFont
C#
public Font DefaultFont { get; set; }

The default font of this theme resource. Used as the default value when trying to fetch a font resource that doesn't exist in this theme or is in invalid state. If the default font is also missing or invalid, the engine fallback value is used (see ThemeDB.FallbackFont). Use Theme.HasDefaultFont to check if this value is valid.

DefaultFontSizeProperty
# DefaultFontSize
C#
public int DefaultFontSize { get; set; }

The default font size of this theme resource. Used as the default value when trying to fetch a font size value that doesn't exist in this theme or is in invalid state. If the default font size is also missing or invalid, the engine fallback value is used (see ThemeDB.FallbackFontSize). Values below 1 are invalid and can be used to unset the property. Use Theme.HasDefaultFontSize to check if this value is valid.

Methods76

AddTypevoid
# AddType
C#
public void AddType(StringName themeType);

Adds an empty theme type for every valid data type. Note: Empty types are not saved with the theme. This method only exists to perform in-memory changes to the resource. Use available set_* methods to add theme items.

Parameters
NameTypeDefault
themeTypeStringName—
Clearvoid
# Clear
C#
public void Clear();

Removes all the theme properties defined on the theme resource.

ClearColorvoid
# ClearColor
C#
public void ClearColor(StringName name, StringName themeType);

Removes the Color property defined by name and theme_type, if it exists. Fails if it doesn't exist. Use Theme.HasColor to check for existence.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
ClearConstantvoid
# ClearConstant
C#
public void ClearConstant(StringName name, StringName themeType);

Removes the constant property defined by name and theme_type, if it exists. Fails if it doesn't exist. Use Theme.HasConstant to check for existence.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
ClearFontvoid
# ClearFont
C#
public void ClearFont(StringName name, StringName themeType);

Removes the Font property defined by name and theme_type, if it exists. Fails if it doesn't exist. Use Theme.HasFont to check for existence.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
ClearFontSizevoid
# ClearFontSize
C#
public void ClearFontSize(StringName name, StringName themeType);

Removes the font size property defined by name and theme_type, if it exists. Fails if it doesn't exist. Use Theme.HasFontSize to check for existence.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
ClearIconvoid
# ClearIcon
C#
public void ClearIcon(StringName name, StringName themeType);

Removes the icon property defined by name and theme_type, if it exists. Fails if it doesn't exist. Use Theme.HasIcon to check for existence.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
ClearSoundvoid
# ClearSound
C#
public void ClearSound(StringName name, StringName themeType);

Removes the sound property defined by name and theme_type, if it exists. Fails if it doesn't exist. Use Theme.HasSound to check for existence.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
ClearStyleboxvoid
# ClearStylebox
C#
public void ClearStylebox(StringName name, StringName themeType);

Removes the StyleBox property defined by name and theme_type, if it exists. Fails if it doesn't exist. Use Theme.HasStylebox to check for existence.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
ClearThemeItemvoid
# ClearThemeItem
C#
public void ClearThemeItem(Theme.DataType dataType, StringName name, StringName themeType);

Removes the theme property of data_type defined by name and theme_type, if it exists. Fails if it doesn't exist. Use Theme.HasThemeItem to check for existence. Note: This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

Parameters
NameTypeDefault
dataTypeTheme.DataType—
nameStringName—
themeTypeStringName—
ClearTypeVariationvoid
# ClearTypeVariation
C#
public void ClearTypeVariation(StringName themeType);

Unmarks theme_type as being a variation of another theme type. See Theme.SetTypeVariation.

Parameters
NameTypeDefault
themeTypeStringName—
GetColorColor
# GetColor
C#
public Color GetColor(StringName name, StringName themeType);

Reads a color by name and type from this resource. It does not resolve the Control hierarchy or local overrides; use Control.GetThemeColor for a control's final color.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns Color
GetColorListstring[]
# GetColorList
C#
public string[] GetColorList(string themeType);

Returns a list of names for Color properties defined with theme_type. Use Theme.GetColorTypeList to get a list of possible theme type names.

Parameters
NameTypeDefault
themeTypestring—
Returns string[]
GetColorTypeListstring[]
# GetColorTypeList
C#
public string[] GetColorTypeList();

Returns a list of all unique theme type names for Color properties. Use Theme.GetTypeList to get a list of all unique theme types.

Returns string[]
GetConstantint
# GetConstant
C#
public int GetConstant(StringName name, StringName themeType);

Returns the constant property defined by name and theme_type, if it exists. Returns 0 if the property doesn't exist. Use Theme.HasConstant to check for existence.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns int
GetConstantListstring[]
# GetConstantList
C#
public string[] GetConstantList(string themeType);

Returns a list of names for constant properties defined with theme_type. Use Theme.GetConstantTypeList to get a list of possible theme type names.

Parameters
NameTypeDefault
themeTypestring—
Returns string[]
GetConstantTypeListstring[]
# GetConstantTypeList
C#
public string[] GetConstantTypeList();

Returns a list of all unique theme type names for constant properties. Use Theme.GetTypeList to get a list of all unique theme types.

Returns string[]
GetDefaultBaseScalefloat
# GetDefaultBaseScale
C#
public float GetDefaultBaseScale();
Returns float
GetDefaultFontFont
# GetDefaultFont
C#
public Font GetDefaultFont();
Returns Font
GetDefaultFontSizeint
# GetDefaultFontSize
C#
public int GetDefaultFontSize();
Returns int
GetFontFont
# GetFont
C#
public Font GetFont(StringName name, StringName themeType);

Returns the Font property defined by name and theme_type, if it exists. Returns the default theme font if the property doesn't exist and the default theme font is set up (see Theme.DefaultFont). Use Theme.HasFont to check for existence of the property and Theme.HasDefaultFont to check for existence of the default theme font. Returns the engine fallback font value, if neither exist (see ThemeDB.FallbackFont).

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns Font
GetFontListstring[]
# GetFontList
C#
public string[] GetFontList(string themeType);

Returns a list of names for Font properties defined with theme_type. Use Theme.GetFontTypeList to get a list of possible theme type names.

Parameters
NameTypeDefault
themeTypestring—
Returns string[]
GetFontSizeint
# GetFontSize
C#
public int GetFontSize(StringName name, StringName themeType);

Returns the font size property defined by name and theme_type, if it exists. Returns the default theme font size if the property doesn't exist and the default theme font size is set up (see Theme.DefaultFontSize). Use Theme.HasFontSize to check for existence of the property and Theme.HasDefaultFontSize to check for existence of the default theme font. Returns the engine fallback font size value, if neither exist (see ThemeDB.FallbackFontSize).

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns int
GetFontSizeListstring[]
# GetFontSizeList
C#
public string[] GetFontSizeList(string themeType);

Returns a list of names for font size properties defined with theme_type. Use Theme.GetFontSizeTypeList to get a list of possible theme type names.

Parameters
NameTypeDefault
themeTypestring—
Returns string[]
GetFontSizeTypeListstring[]
# GetFontSizeTypeList
C#
public string[] GetFontSizeTypeList();

Returns a list of all unique theme type names for font size properties. Use Theme.GetTypeList to get a list of all unique theme types.

Returns string[]
GetFontTypeListstring[]
# GetFontTypeList
C#
public string[] GetFontTypeList();

Returns a list of all unique theme type names for Font properties. Use Theme.GetTypeList to get a list of all unique theme types.

Returns string[]
GetIconTexture2D
# GetIcon
C#
public Texture2D GetIcon(StringName name, StringName themeType);

Returns the icon property defined by name and theme_type, if it exists. Returns the engine fallback icon value if the property doesn't exist (see ThemeDB.FallbackIcon). Use Theme.HasIcon to check for existence.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns Texture2D
GetIconListstring[]
# GetIconList
C#
public string[] GetIconList(string themeType);

Returns a list of names for icon properties defined with theme_type. Use Theme.GetIconTypeList to get a list of possible theme type names.

Parameters
NameTypeDefault
themeTypestring—
Returns string[]
GetIconTypeListstring[]
# GetIconTypeList
C#
public string[] GetIconTypeList();

Returns a list of all unique theme type names for icon properties. Use Theme.GetTypeList to get a list of all unique theme types.

Returns string[]
GetSoundAudioStream
# GetSound
C#
public AudioStream GetSound(StringName name, StringName themeType);

Returns the sound property defined by name and theme_type, if it exists. Returns the engine fallback sound value if the property doesn't exist (see ThemeDB.FallbackSound). Use Theme.HasSound to check for existence.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns AudioStream
GetSoundListstring[]
# GetSoundList
C#
public string[] GetSoundList(string themeType);

Returns a list of names for sound properties defined with theme_type. Use Theme.GetSoundTypeList to get a list of possible theme type names.

Parameters
NameTypeDefault
themeTypestring—
Returns string[]
GetSoundTypeListstring[]
# GetSoundTypeList
C#
public string[] GetSoundTypeList();

Returns a list of all unique theme type names for sound properties. Use Theme.GetTypeList to get a list of all unique theme types.

Returns string[]
GetStyleboxStyleBox
# GetStylebox
C#
public StyleBox GetStylebox(StringName name, StringName themeType);

Returns this theme's StyleBox resource without cloning. Mutating a shared StyleBox affects all its users; Duplicate it for an independent variant.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns StyleBox
GetStyleboxListstring[]
# GetStyleboxList
C#
public string[] GetStyleboxList(string themeType);

Returns a list of names for StyleBox properties defined with theme_type. Use Theme.GetStyleboxTypeList to get a list of possible theme type names.

Parameters
NameTypeDefault
themeTypestring—
Returns string[]
GetStyleboxTypeListstring[]
# GetStyleboxTypeList
C#
public string[] GetStyleboxTypeList();

Returns a list of all unique theme type names for StyleBox properties. Use Theme.GetTypeList to get a list of all unique theme types.

Returns string[]
GetThemeItemVariant
# GetThemeItem
C#
public Variant GetThemeItem(Theme.DataType dataType, StringName name, StringName themeType);

Returns the theme property of data_type defined by name and theme_type, if it exists. Returns the engine fallback value if the property doesn't exist (see ThemeDB). Use Theme.HasThemeItem to check for existence. Note: This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

Parameters
NameTypeDefault
dataTypeTheme.DataType—
nameStringName—
themeTypeStringName—
Returns Variant
GetThemeItemListstring[]
# GetThemeItemList
C#
public string[] GetThemeItemList(Theme.DataType dataType, string themeType);

Returns a list of names for properties of data_type defined with theme_type. Use Theme.GetThemeItemTypeList to get a list of possible theme type names. Note: This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

Parameters
NameTypeDefault
dataTypeTheme.DataType—
themeTypestring—
Returns string[]
GetThemeItemTypeListstring[]
# GetThemeItemTypeList
C#
public string[] GetThemeItemTypeList(Theme.DataType dataType);

Returns a list of all unique theme type names for data_type properties. Use Theme.GetTypeList to get a list of all unique theme types. Note: This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

Parameters
NameTypeDefault
dataTypeTheme.DataType—
Returns string[]
GetTypeListstring[]
# GetTypeList
C#
public string[] GetTypeList();

Returns a list of all unique theme type names. Use the appropriate get_*_type_list method to get a list of unique theme types for a single data type.

Returns string[]
GetTypeVariationBaseStringName
# GetTypeVariationBase
C#
public StringName GetTypeVariationBase(StringName themeType);

Returns the name of the base theme type if theme_type is a valid variation type. Returns an empty string otherwise.

Parameters
NameTypeDefault
themeTypeStringName—
Returns StringName
GetTypeVariationListstring[]
# GetTypeVariationList
C#
public string[] GetTypeVariationList(StringName baseType);

Returns a list of all type variations for the given base_type.

Parameters
NameTypeDefault
baseTypeStringName—
Returns string[]
HasColorbool
# HasColor
C#
public bool HasColor(StringName name, StringName themeType);

Returns true if the Color property defined by name and theme_type exists. Returns false if it doesn't exist. Use Theme.SetColor to define it.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns bool
HasConstantbool
# HasConstant
C#
public bool HasConstant(StringName name, StringName themeType);

Returns true if the constant property defined by name and theme_type exists. Returns false if it doesn't exist. Use Theme.SetConstant to define it.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns bool
HasDefaultBaseScalebool
# HasDefaultBaseScale
C#
public bool HasDefaultBaseScale();

Returns true if Theme.DefaultBaseScale has a valid value. Returns false if it doesn't. The value must be greater than 0.0 to be considered valid.

Returns bool
HasDefaultFontbool
# HasDefaultFont
C#
public bool HasDefaultFont();

Returns true if Theme.DefaultFont has a valid value. Returns false if it doesn't.

Returns bool
HasDefaultFontSizebool
# HasDefaultFontSize
C#
public bool HasDefaultFontSize();

Returns true if Theme.DefaultFontSize has a valid value. Returns false if it doesn't. The value must be greater than 0 to be considered valid.

Returns bool
HasFontbool
# HasFont
C#
public bool HasFont(StringName name, StringName themeType);

Returns true if the Font property defined by name and theme_type exists, or if the default theme font is set up (see Theme.HasDefaultFont). Returns false if neither exist. Use Theme.SetFont to define the property.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns bool
HasFontSizebool
# HasFontSize
C#
public bool HasFontSize(StringName name, StringName themeType);

Returns true if the font size property defined by name and theme_type exists, or if the default theme font size is set up (see Theme.HasDefaultFontSize). Returns false if neither exist. Use Theme.SetFontSize to define the property.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns bool
HasIconbool
# HasIcon
C#
public bool HasIcon(StringName name, StringName themeType);

Returns true if the icon property defined by name and theme_type exists. Returns false if it doesn't exist. Use Theme.SetIcon to define it.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns bool
HasSoundbool
# HasSound
C#
public bool HasSound(StringName name, StringName themeType);

Returns true if the sound property defined by name and theme_type exists. Returns false if it doesn't exist. Use Theme.SetSound to define it.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns bool
HasStyleboxbool
# HasStylebox
C#
public bool HasStylebox(StringName name, StringName themeType);

Returns true if the StyleBox property defined by name and theme_type exists. Returns false if it doesn't exist. Use Theme.SetStylebox to define it.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
Returns bool
HasThemeItembool
# HasThemeItem
C#
public bool HasThemeItem(Theme.DataType dataType, StringName name, StringName themeType);

Returns true if the theme property of data_type defined by name and theme_type exists. Returns false if it doesn't exist. Use Theme.SetThemeItem to define it. Note: This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

Parameters
NameTypeDefault
dataTypeTheme.DataType—
nameStringName—
themeTypeStringName—
Returns bool
IsTypeVariationbool
# IsTypeVariation
C#
public bool IsTypeVariation(StringName themeType, StringName baseType);

Returns true if theme_type is marked as a variation of base_type.

Parameters
NameTypeDefault
themeTypeStringName—
baseTypeStringName—
Returns bool
MergeWithvoid
# MergeWith
C#
public void MergeWith(Theme other);

Adds missing and overrides existing definitions with values from the other theme resource. Note: This modifies the current theme. If you want to merge two themes together without modifying either one, create a new empty theme and merge the other two into it one after another.

Parameters
NameTypeDefault
otherTheme—
RemoveTypevoid
# RemoveType
C#
public void RemoveType(StringName themeType);

Removes the theme type, gracefully discarding defined theme items. If the type is a variation, this information is also erased. If the type is a base for type variations, those variations lose their base.

Parameters
NameTypeDefault
themeTypeStringName—
RenameColorvoid
# RenameColor
C#
public void RenameColor(StringName oldName, StringName name, StringName themeType);

Renames the Color property defined by old_name and theme_type to name, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use Theme.HasColor to check for existence, and Theme.ClearColor to remove the existing property.

Parameters
NameTypeDefault
oldNameStringName—
nameStringName—
themeTypeStringName—
RenameConstantvoid
# RenameConstant
C#
public void RenameConstant(StringName oldName, StringName name, StringName themeType);

Renames the constant property defined by old_name and theme_type to name, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use Theme.HasConstant to check for existence, and Theme.ClearConstant to remove the existing property.

Parameters
NameTypeDefault
oldNameStringName—
nameStringName—
themeTypeStringName—
RenameFontvoid
# RenameFont
C#
public void RenameFont(StringName oldName, StringName name, StringName themeType);

Renames the Font property defined by old_name and theme_type to name, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use Theme.HasFont to check for existence, and Theme.ClearFont to remove the existing property.

Parameters
NameTypeDefault
oldNameStringName—
nameStringName—
themeTypeStringName—
RenameFontSizevoid
# RenameFontSize
C#
public void RenameFontSize(StringName oldName, StringName name, StringName themeType);

Renames the font size property defined by old_name and theme_type to name, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use Theme.HasFontSize to check for existence, and Theme.ClearFontSize to remove the existing property.

Parameters
NameTypeDefault
oldNameStringName—
nameStringName—
themeTypeStringName—
RenameIconvoid
# RenameIcon
C#
public void RenameIcon(StringName oldName, StringName name, StringName themeType);

Renames the icon property defined by old_name and theme_type to name, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use Theme.HasIcon to check for existence, and Theme.ClearIcon to remove the existing property.

Parameters
NameTypeDefault
oldNameStringName—
nameStringName—
themeTypeStringName—
RenameSoundvoid
# RenameSound
C#
public void RenameSound(StringName oldName, StringName name, StringName themeType);

Renames the sound property defined by old_name and theme_type to name, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use Theme.HasSound to check for existence, and Theme.ClearSound to remove the existing property.

Parameters
NameTypeDefault
oldNameStringName—
nameStringName—
themeTypeStringName—
RenameStyleboxvoid
# RenameStylebox
C#
public void RenameStylebox(StringName oldName, StringName name, StringName themeType);

Renames the StyleBox property defined by old_name and theme_type to name, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use Theme.HasStylebox to check for existence, and Theme.ClearStylebox to remove the existing property.

Parameters
NameTypeDefault
oldNameStringName—
nameStringName—
themeTypeStringName—
RenameThemeItemvoid
# RenameThemeItem
C#
public void RenameThemeItem(Theme.DataType dataType, StringName oldName, StringName name, StringName themeType);

Renames the theme property of data_type defined by old_name and theme_type to name, if it exists. Fails if it doesn't exist, or if a similar property with the new name already exists. Use Theme.HasThemeItem to check for existence, and Theme.ClearThemeItem to remove the existing property. Note: This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

Parameters
NameTypeDefault
dataTypeTheme.DataType—
oldNameStringName—
nameStringName—
themeTypeStringName—
RenameTypevoid
# RenameType
C#
public void RenameType(StringName oldThemeType, StringName themeType);

Renames the theme type old_theme_type to theme_type, if the old type exists and the new one doesn't exist. Note: Renaming a theme type to an empty name or a variation to a type associated with a built-in class removes type variation connections in a way that cannot be undone by reversing the rename alone.

Parameters
NameTypeDefault
oldThemeTypeStringName—
themeTypeStringName—
SetColorvoid
# SetColor
C#
public void SetColor(StringName name, StringName themeType, Color color);

Creates or changes the value of the Color property defined by name and theme_type. Use Theme.ClearColor to remove the property.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
colorColor—
SetConstantvoid
# SetConstant
C#
public void SetConstant(StringName name, StringName themeType, int constant);

Creates or changes the value of the constant property defined by name and theme_type. Use Theme.ClearConstant to remove the property.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
constantint—
SetDefaultBaseScalevoid
# SetDefaultBaseScale
C#
public void SetDefaultBaseScale(float baseScale);
Parameters
NameTypeDefault
baseScalefloat—
SetDefaultFontvoid
# SetDefaultFont
C#
public void SetDefaultFont(Font font);
Parameters
NameTypeDefault
fontFont—
SetDefaultFontSizevoid
# SetDefaultFontSize
C#
public void SetDefaultFontSize(int fontSize);
Parameters
NameTypeDefault
fontSizeint—
SetFontvoid
# SetFont
C#
public void SetFont(StringName name, StringName themeType, Font font);

Creates or changes the value of the Font property defined by name and theme_type. Use Theme.ClearFont to remove the property.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
fontFont—
SetFontSizevoid
# SetFontSize
C#
public void SetFontSize(StringName name, StringName themeType, int fontSize);

Creates or changes the value of the font size property defined by name and theme_type. Use Theme.ClearFontSize to remove the property.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
fontSizeint—
SetIconvoid
# SetIcon
C#
public void SetIcon(StringName name, StringName themeType, Texture2D texture);

Creates or changes the value of the icon property defined by name and theme_type. Use Theme.ClearIcon to remove the property.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
textureTexture2D—
SetSoundvoid
# SetSound
C#
public void SetSound(StringName name, StringName themeType, AudioStream sound);

Creates or changes the value of the sound property defined by name and theme_type. Use Theme.ClearSound to remove the property.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
soundAudioStream—
SetStyleboxvoid
# SetStylebox
C#
public void SetStylebox(StringName name, StringName themeType, StyleBox texture);

Creates or changes the value of the StyleBox property defined by name and theme_type. Use Theme.ClearStylebox to remove the property.

Parameters
NameTypeDefault
nameStringName—
themeTypeStringName—
textureStyleBox—
SetThemeItemvoid
# SetThemeItem
C#
public void SetThemeItem(Theme.DataType dataType, StringName name, StringName themeType, Variant value);

Creates or changes the value of the theme property of data_type defined by name and theme_type. Use Theme.ClearThemeItem to remove the property. Fails if the value type is not accepted by data_type. Note: This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.

Parameters
NameTypeDefault
dataTypeTheme.DataType—
nameStringName—
themeTypeStringName—
valueVariant—
SetTypeVariationvoid
# SetTypeVariation
C#
public void SetTypeVariation(StringName themeType, StringName baseType);

Sets the base type of a named variation. Keep its chain consistent within one Theme; your C# class name does not automatically define a variation. Assign Control.ThemeTypeVariation explicitly.

Parameters
NameTypeDefault
themeTypeStringName—
baseTypeStringName—

Theme.DataType

ValueDescription
Color = 0

Theme's Color item type.

Constant = 1

Theme's constant item type.

Font = 2

Theme's Font item type.

FontSize = 3

Theme's font size item type.

Icon = 4

Theme's icon Texture2D item type.

Max = 7

Maximum value for the DataType enum.

Sound = 6

Theme's AudioStream item type.

Stylebox = 5

Theme's StyleBox item type.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.