Exemple #1
0
        public void Set <T>(StylePropertyName styleName, T value, GUIState state)
        {
            var rule = this.GetRule <T>(styleName, state);

            if (rule == null)
            {
                rule = new StyleRule <T>(styleName, value, state);
                this.AppendRule(rule);
            }
            else
            {
                rule.Value = value;
            }
        }
Exemple #2
0
        public void Set <T>(GUIStyleName styleName, T value)
        {
            var rule = this.GetRule <T>(styleName, this.currentState);

            if (rule == null)
            {
                rule = new StyleRule <T>(styleName, value);
                this.AppendRule(rule);
            }
            else
            {
                rule.Value = value;
            }
        }
Exemple #3
0
        //TODO add a constructor that clones rules from another rule-set

        public void AppendRule <T>(StyleRule <T> rule)
        {
            this.rules.Add(rule);
        }