示例#1
0
        public void SetContext(StyleSheet sheet, StyleComplexSelector selector, StyleVariableContext varContext)
        {
            m_Sheet       = sheet;
            m_Properties  = selector.rule.properties;
            m_PropertyIds = StyleSheetCache.GetPropertyIds(sheet, selector.ruleIndex);
            m_Resolver.variableContext = varContext;

            LoadProperties();
        }
示例#2
0
 public void SetContext(StyleSheet sheet, StyleComplexSelector selector, StyleVariableContext varContext, float dpiScaling = 1f)
 {
     this.m_Sheet       = sheet;
     this.m_Properties  = selector.rule.properties;
     this.m_PropertyIds = StyleSheetCache.GetPropertyIds(sheet, selector.ruleIndex);
     this.m_Resolver.variableContext = varContext;
     this.dpiScaling = dpiScaling;
     this.LoadProperties();
 }
示例#3
0
        public void SetContext(StyleSheet sheet, StyleComplexSelector selector, StyleVariableContext varContext)
        {
            m_Sheet       = sheet;
            m_Properties  = selector.rule.properties;
            m_PropertyIDs = StyleSheetCache.GetPropertyIDs(sheet, selector.ruleIndex);
            m_Resolver.variableContext = varContext;

            specificity = sheet.isUnityStyleSheet ? StyleValueExtensions.UnitySpecificity : selector.specificity;
            LoadProperties();
        }