Exemplo n.º 1
0
        /// <summary>
        /// Applies a theme to an element
        /// </summary>
        public void ApplyTheme(Transform element, UIThemeAsset theme)
        {
            if (CoreParams.UIThemeMode == UIThemePolicy.Disabled || theme == null)
            {
                return;
            }

            ThemeEngine.ApplyThemeToElement(element, theme);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Applies a theme to an element
        /// </summary>
        public void ApplyTheme(Transform element, UIThemeAsset theme)
        {
            if (CoreParams.UIThemeMode == UIThemePolicy.Disabled)
            {
                LogWarning($"Can't apply theme to element because theme engine is disabled!");
                return;
            }

            if (theme == null)
            {
                LogWarning($"Can't apply theme to element because theme is null!");
                return;
            }

            ThemeEngine.ApplyThemeToElement(element, theme);
        }