InteractableColorTheme Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Theme Engine that can set colors on a Renderer or text object based on state changes This Theme will try to set color on first available text object in order of TextMesh, Text, TextMeshPro, and TextMeshProUGUI object If no text-based component can be found, then will fall back to first Renderer component found on the initialized GameObject and target the color shader property provided in the ThemeDefinition.
public ref class InteractableColorTheme : Microsoft::MixedReality::Toolkit::UI::InteractableShaderTheme
public class InteractableColorTheme : Microsoft.MixedReality.Toolkit.UI.InteractableShaderTheme
type InteractableColorTheme = class
inherit InteractableShaderTheme
Public Class InteractableColorTheme
Inherits InteractableShaderTheme
- Inheritance
- Derived
Constructors
InteractableColorTheme() |
Fields
DefaultShaderProperty | |
originalStateValues | (Inherited from InteractableThemeBase) |
propertyBlock | (Inherited from InteractableShaderTheme) |
renderer | (Inherited from InteractableShaderTheme) |
shaderProperties | (Inherited from InteractableShaderTheme) |
Properties
AreShadersSupported |
Indicates whether the current Theme engine implementation supports shader targeting on state properties (Inherited from InteractableShaderTheme) |
Ease |
Defines how to ease between values during state changes (Inherited from InteractableThemeBase) |
Host |
GameObject initialized with this ThemeEngine and being targeted based on state changes (Inherited from InteractableThemeBase) |
IsEasingSupported |
Indicates whether the current Theme engine implementation supports easing between state values (Inherited from InteractableThemeBase) |
Loaded |
True if Theme Engine has been initialized, false otherwise (Inherited from InteractableThemeBase) |
Name |
Name of Theme Engine (Inherited from InteractableThemeBase) |
Properties |
List of global Theme Engine properties (Inherited from InteractableThemeBase) |
StateProperties |
List of Properties with values per state (Inherited from InteractableThemeBase) |
Types |
Types of component this Theme Engine will target on the initialized GameObject or related GameObjects (Inherited from InteractableThemeBase) |
Methods
GetDefaultThemeDefinition() |
Generates the default theme definition configuration for the current theme implementation |
GetProperty(ThemeStateProperty) |
Get the current property value for the provided state property |
GetThemeProperty(Int32) | (Inherited from InteractableThemeBase) |
HasTextComponentOnObject(GameObject) |
Looks to see if a text component exists on the host |
Init(GameObject, ThemeDefinition) |
Initialize current Theme Engine with given configuration and target the provided GameObject |
LerpFloat(Single, Single, Single) | (Inherited from InteractableThemeBase) |
LerpInt(Int32, Int32, Single) | (Inherited from InteractableThemeBase) |
OnUpdate(Int32, Boolean) |
Update ThemeEngine for given state based on Theme logic. Check, sets, and possibly eases values based on given state (Inherited from InteractableThemeBase) |
Reset() |
Resets properties on Host GameObject to their original values when Init() was called for this theme engine. Useful for reverting changes done by this theme engine. (Inherited from InteractableThemeBase) |
SetValue(ThemeStateProperty, Int32, Single) |
Instruct theme to set value for current property with given index state and at given lerp percentage |
SetValue(ThemeStateProperty, ThemePropertyValue) |
Instruct theme to set value for current property with ThemePropertyValue value provided (Inherited from InteractableShaderTheme) |
TryGetRendererColor(ThemeStateProperty, Color) |
Try to get color from the renderer return true, no text components exists, so falling back to base |
TryGetTextColor(ThemeStateProperty, Color) |
Try to get a color from UI Text if no color is found, a text component does not exist on this object |
TryGetTextMeshColor(ThemeStateProperty, Color) |
Try to get color from TextMesh If no color is found, not TextMesh on this object |
TryGetTextMeshProColor(ThemeStateProperty, Color) |
Try to get color from TextMeshPro If no color is found, TextMeshPro is not on the object |
TryGetTextMeshProUGUIColor(ThemeStateProperty, Color) |
Try to get color from TextMeshProUGUI If no color is found, TextMeshProUGUI is not on the object |
TrySetRendererColor(Color, ThemeStateProperty, Int32, Single) |
Try to set color on a renderer should just return true - falling back to base |
TrySetTextColor(Color, ThemeStateProperty, Int32, Single) |
Try to set color on UI Text If false, no UI Text was found |
TrySetTextMeshColor(Color, ThemeStateProperty, Int32, Single) |
Try to set color on TextMesh If false, no TextMesh was found |
TrySetTextMeshProColor(Color, ThemeStateProperty, Int32, Single) |
Try to set color on TextMeshPro If false, no TextMeshPro was found |
TrySetTextMeshProUGUIColor(Color, ThemeStateProperty, Int32, Single) |
Try to set color on TextMeshProUGUI If false, no TextMeshProUGUI was found |