Beispiel #1
0
        public void ApplySkin(GUIControlName control)
        {
            var modifiers = GUISkin.Current.GetStyleModifiers(control);

            foreach (var modifier in modifiers)
            {
                this.Push(modifier);
            }
        }
Beispiel #2
0
 internal StyleRuleSet this[GUIControlName name]
 {
     get
     {
         if (Custom != null && Custom.styles.TryGetValue(name, out var value))
         {
             return(value);
         }
         return(this.styles[name]);
     }
 }
Beispiel #3
0
 public StyleRuleSet this[GUIControlName index]
 {
     get
     {
         if (Rules.TryGetValue(index, out var value))
         {
             return(value);
         }
         else
         {
             var ruleSet = Rules[index] = new StyleRuleSet();
             return(ruleSet);
         }
     }
 }
Beispiel #4
0
 public IReadOnlyList <StyleModifier> GetStyleModifiers(GUIControlName control)
 {
     return(this.styles[control]);
 }
Beispiel #5
0
 public StyleRuleSet this[GUIControlName name] => this.styles[name];