示例#1
0
        internal Dimension ReadDimension(StyleValueHandle handle)
        {
            bool      flag = handle.valueType == StyleValueType.Float;
            Dimension result;

            if (flag)
            {
                float value = StyleSheet.CheckAccess <float>(this.floats, StyleValueType.Float, handle);
                result = new Dimension(value, Dimension.Unit.Unitless);
            }
            else
            {
                result = StyleSheet.CheckAccess <Dimension>(this.dimensions, StyleValueType.Dimension, handle);
            }
            return(result);
        }
示例#2
0
        internal float ReadFloat(StyleValueHandle handle)
        {
            bool  flag = handle.valueType == StyleValueType.Dimension;
            float result;

            if (flag)
            {
                Dimension dimension = StyleSheet.CheckAccess <Dimension>(this.dimensions, StyleValueType.Dimension, handle);
                result = dimension.value;
            }
            else
            {
                result = StyleSheet.CheckAccess <float>(this.floats, StyleValueType.Float, handle);
            }
            return(result);
        }
示例#3
0
 internal ScalableImage ReadScalableImage(StyleValueHandle handle)
 {
     return(StyleSheet.CheckAccess <ScalableImage>(this.scalableImages, StyleValueType.ScalableImage, handle));
 }
示例#4
0
 internal string ReadMissingAssetReferenceUrl(StyleValueHandle handle)
 {
     return(StyleSheet.CheckAccess <string>(this.strings, StyleValueType.MissingAssetReference, handle));
 }
示例#5
0
 internal UnityEngine.Object ReadAssetReference(StyleValueHandle handle)
 {
     return(StyleSheet.CheckAccess <UnityEngine.Object>(this.assets, StyleValueType.AssetReference, handle));
 }
示例#6
0
 internal string ReadResourcePath(StyleValueHandle handle)
 {
     return(StyleSheet.CheckAccess <string>(this.strings, StyleValueType.ResourcePath, handle));
 }
示例#7
0
 internal string ReadVariable(StyleValueHandle handle)
 {
     return(StyleSheet.CheckAccess <string>(this.strings, StyleValueType.Variable, handle));
 }
示例#8
0
 internal string ReadEnum(StyleValueHandle handle)
 {
     return(StyleSheet.CheckAccess <string>(this.strings, StyleValueType.Enum, handle));
 }
示例#9
0
 internal Color ReadColor(StyleValueHandle handle)
 {
     return(StyleSheet.CheckAccess <Color>(this.colors, StyleValueType.Color, handle));
 }