Beispiel #1
0
        public Style GetStyle(string key)
        {
            if (StyleSheet == null)
            {
                Debug.LogWarning("[StyleRoot] StyleSheet is not set.", this);
                return(null);
            }

            return(StyleSheet.GetStyle(key, true));
        }
Beispiel #2
0
        public Style GetStyle(string key, bool searchParent = true)
        {
            var i = _keys.IndexOf(key);

            if (i < 0)
            {
                if (searchParent && Parent != null)
                {
                    return(Parent.GetStyle(key));
                }

                return(null);
            }

            return(_styles[i]);
        }