Class ThemeIcon
An SVG image component that switches between two sprites depending on the Theme preference: Light / Dark.
Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
ThemeIcon
Implements
Inherited Members
Namespace: AdrianMiasik.Components.Core
Assembly: Assembly-CSharp.dll
Syntax
public class ThemeIcon : ThemeElement, IColorHook
Methods
| Improve this Doc View SourceChangeColor(Color)
Sets the SVG image icon to the provided color.
Declaration
public void ChangeColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Color | color |
ChangeSprite(Sprite)
Swaps the SVG image icon to use the provided sprite.
Declaration
public void ChangeSprite(Sprite sprite)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Sprite | sprite |
ColorUpdate(Theme)
Applies our Theme changes to our referenced components when necessary.
Declaration
public override void ColorUpdate(Theme theme)
Parameters
Type | Name | Description |
---|---|---|
Theme | theme | The theme to apply on our referenced components. |