Learn / Documentation / Script Reference / ThemeVariantData
Manual

ThemeVariantData

class in Doozy.Engine.Themes

Description

The ThemeVariantData holds all the data of a theme variant

Properties

  •  public Guid Id – Id of this Theme Variant

  • public string VariantName – Name of this Theme Variant

Public Variables

  • public List<ColorId> Colors – List of ColorIds that contains all the Color values

  • public List<SpriteId> Sprites – List of SpriteId that contains all the Sprite references

  • public List<TextureId> Textures – List of TextureId that contains all the Texture references

  • public List<FontId> Fonts – List of FontId that contains all the Font references

  • public List<FontAssetId> FontAssets – List of FontAssetId that contains all the TextMeshPro FontAsset references

Constructors

  • public ThemeVariantData() – Construct a new ThemeVariantData with a unique Id

  • public ThemeVariantData(string variantName) – Construct a new ThemeVariantData with a given name and a unique Id

  • public ThemeVariantData(string variantName, List<LabelId> colorLabels, List<LabelId> spriteLabels, List<LabelId> textureLabels, List<LabelId> fontLabels, List<LabelId> fontAssetLabels) – Construct a new ThemeVariantData with the given settings and a unique Id

Public Methods

  • public void AddColorProperty(Guid guid) – Add a new Color property with the given Id

  • public void AddColorProperty(Guid guid, Color color) – Add a new Color property with a given value and Id

  • public bool ContainsColor(Guid propertyId) – Returns true if this theme contains a Color property with the given Id

  • public Color GetColor(Guid propertyId) – Get the Color with the given property Id

  • public void AddSpriteProperty(Guid guid) – Add a new Sprite property with the given Id

  • public void AddSpriteProperty(Guid guid, Sprite sprite) – Add a new Sprite property with a given value and Id

  • public bool ContainsSprite(Guid propertyId) – Returns true if this theme contains a Sprite property with the given Id

  • public Sprite GetSprite(Guid propertyId) – Get the Sprite reference with the given property Id

  • public void AddTextureProperty(Guid guid) – Add a new Texture property with the given Id

  • public void AddTextureProperty(Guid guid, Texture texture) – Add a new Texture property with a given value and Id

  • public bool ContainsTexture(Guid propertyId) – Returns true if this theme contains a Texture property with the given Id

  • public Texture GetTexture(Guid propertyId) – Get the Texture reference with the given property Id

  • public void AddFontProperty(Guid guid) – Add a new Font property with the given Id

  • public void AddFontProperty(Guid guid, Font font) – Add a new Font property with a given value and Id

  • public bool ContainsFont(Guid propertyId) – Returns true if this theme contains a Font property with the given Id

  • public Font GetFont(Guid propertyId) – Get the Font reference with the given property Id

  • public void AddFontAssetProperty(Guid guid) – Add a new FontAsset property with the given Id

  • public void AddFontAssetProperty(Guid guid, TMP_FontAsset fontAsset) – Add a new FontAsset property with a given value and Id

  • public bool ContainsFontAsset(Guid propertyId) – Returns true if this theme contains a FontAsset property with the given Id

  • public TMP_FontAsset GetFontAsset(Guid propertyId) – Get the FontAsset reference with the given property Id