Beispiel #1
0
 public ModSliderInput(SliderElement element, IModMenu menu) : base(element, menu)
 {
     _element                = element;
     _uIStyleApplier         = element.GetComponent <UIStyleApplier>();
     element.OnValueChanged += () => InvokeOnChange(Value);
 }
Beispiel #2
0
        public void Initialize(UIStyleApplier oldStyleApplier)
        {
            var fields = typeof(UIStyleApplier).GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).ToList();

            fields.ForEach(field => field.SetValue(this, field.GetValue(oldStyleApplier)));
        }