public ModSliderInput(SliderElement element, IModMenu menu) : base(element, menu) { _element = element; _uIStyleApplier = element.GetComponent <UIStyleApplier>(); element.OnValueChanged += () => InvokeOnChange(Value); }
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))); }