Пример #1
0
 public static void Apply <T>(this StyleSheet sheet, StyleValueHandle handle, int specificity, ref Style <int> property) where T : struct
 {
     if (handle.valueType == StyleValueType.Keyword && handle.valueIndex == 2)
     {
         StyleSheetExtensions.Apply <int>(0, specificity, ref property);
     }
     else
     {
         StyleSheetExtensions.Apply <int>(StyleSheetCache.GetEnumValue <T>(sheet, handle), specificity, ref property);
     }
 }
Пример #2
0
        public static void ApplyEnum <T>(StyleSheet sheet, StyleValueHandle[] handles, int specificity, ref StyleValue <int> property)
        {
            var value = StyleSheetCache.GetEnumValue <T>(sheet, handles[0]);

            Apply(value, specificity, ref property);
        }
Пример #3
0
        public static void ApplyEnum <T>(StyleSheet sheet, StyleValueHandle[] handles, int specificity, ref StyleValue <int> property)
        {
            int enumValue = StyleSheetCache.GetEnumValue <T>(sheet, handles[0]);

            StyleSheetApplicator.Apply <int>(enumValue, specificity, ref property);
        }