Back to API Reference
Class
SpriteModifier
sealed
Embeds Sprite assets inline with text. The set of named sprites available to <sprite=name> tags is supplied by an ISpriteProvider.
Remarks
Tag syntax: <sprite=name[,colorArg]>. The optional second positional argument controls the rendered color of this occurrence: omitted — use the entry's own
color (the default; keeps atlas/asset colors, matching how raster images are embedded in HTML, iOS NSTextAttachment, Android ImageSpan). i — inherit the host UniText component's color. Equivalent to CSS currentColor. #RGB/#RRGGBB/#RRGGBBAA or a named color (red, blue, …) — explicit per-occurrence override. Examples: <sprite=heart>, <sprite=heart,i>, <sprite=heart,#FF0000>. The sprite name is resolved through Provider. Built-in providers: InlineSpriteProvider (default — inline list on the modifier), AssetSpriteProvider (shared UniTextSprites asset). For dynamic catalogs — input-prompt icon services, localisation, item icons — implement ISpriteProvider directly and raise its Changed event when the resolution result changes.public ISpriteProvider Provider{ get; set }Source of named sprites used by this modifier when resolving <sprite=name> tags. disables resolution.
protected INamedCatalog<InlineSprite> Catalog{ get }