Class InteractableColorTheme
A color theme that can set colors on renderers or common text objects
This theme will try to set color on text objects first, if none can be found,
then we fall back to renderer color setting using the parent class.
Inheritance
InteractableColorTheme
Assembly: cs.temp.dll.dll
public class InteractableColorTheme : InteractableShaderTheme
Constructors
Declaration
public InteractableColorTheme()
Methods
Declaration
public override InteractableThemePropertyValue GetProperty(InteractableThemeProperty property)
Parameters
Returns
Overrides
HasTextComponentOnObject(GameObject)
Looks to see if a text component exists on the host
Declaration
public static bool HasTextComponentOnObject(GameObject host)
Parameters
Type |
Name |
Description |
GameObject |
host |
|
Returns
Declaration
public override void Init(GameObject host, InteractableThemePropertySettings settings)
Parameters
Overrides
Declaration
public override void SetValue(InteractableThemeProperty property, int index, float percentage)
Parameters
Overrides
Try to get color from the renderer
return true, no text components exists, so falling back to base
Declaration
protected bool TryGetRendererColor(InteractableThemeProperty property, out Color color)
Parameters
Returns
TryGetTextColor(InteractableThemeProperty, out Color)
Try to get a color from UI Text
if no color is found, a text component does not exist on this object
Declaration
protected bool TryGetTextColor(InteractableThemeProperty property, out Color color)
Parameters
Returns
TryGetTextMeshColor(InteractableThemeProperty, out Color)
Try to get color from TextMesh
If no color is found, not TextMesh on this object
Declaration
protected bool TryGetTextMeshColor(InteractableThemeProperty property, out Color color)
Parameters
Returns
TryGetTextMeshProColor(InteractableThemeProperty, out Color)
Try to get color from TextMeshPro
If no color is found, TextMeshPro is not on the object
Declaration
protected bool TryGetTextMeshProColor(InteractableThemeProperty property, out Color color)
Parameters
Returns
TryGetTextMeshProUGUIColor(InteractableThemeProperty, out Color)
Try to get color from TextMeshProUGUI
If no color is found, TextMeshProUGUI is not on the object
Declaration
protected bool TryGetTextMeshProUGUIColor(InteractableThemeProperty property, out Color color)
Parameters
Returns
Try to set color on a renderer
should just return true - falling back to base
Declaration
protected bool TrySetRendererColor(Color colour, InteractableThemeProperty property, int index, float percentage)
Parameters
Returns
TrySetTextColor(Color, InteractableThemeProperty, Int32, Single)
Try to set color on UI Text
If false, no UI Text was found
Declaration
protected bool TrySetTextColor(Color colour, InteractableThemeProperty property, int index, float percentage)
Parameters
Returns
TrySetTextMeshColor(Color, InteractableThemeProperty, Int32, Single)
Try to set color on TextMesh
If false, no TextMesh was found
Declaration
protected bool TrySetTextMeshColor(Color colour, InteractableThemeProperty property, int index, float percentage)
Parameters
Returns
TrySetTextMeshProColor(Color, InteractableThemeProperty, Int32, Single)
Try to set color on TextMeshPro
If false, no TextMeshPro was found
Declaration
protected bool TrySetTextMeshProColor(Color colour, InteractableThemeProperty property, int index, float percentage)
Parameters
Returns
TrySetTextMeshProUGUIColor(Color, InteractableThemeProperty, Int32, Single)
Try to set color on TextMeshProUGUI
If false, no TextMeshProUGUI was found
Declaration
protected bool TrySetTextMeshProUGUIColor(Color colour, InteractableThemeProperty property, int index, float percentage)
Parameters
Returns