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; } }
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; } }
//TODO add a constructor that clones rules from another rule-set public void AppendRule <T>(StyleRule <T> rule) { this.rules.Add(rule); }