/// <summary> /// Instantiates a new <see cref="CustomNumericEntry"/> object with default linear incrementation delegates. /// </summary> /// <param name="step">The size of the steps to take.</param> /// <param name="min">The maximum value.</param> /// <param name="max">The minimum value.</param> public CustomNumericEntry(float step, float min, float max) { this.IncrementMethod = (ref float o) => o += o < max ? step : 0; this.DecrementMethod = (ref float o) => o -= o > min ? step : 0; }
/// <summary> /// Instantiates a new <see cref="CustomNumericEntry"/> object with custom step delegates. /// </summary> /// <param name="increment">The method that will be called when an increment is requested.</param> /// <param name="decrement">The method that will be called when a decrement is required.</param> public CustomNumericEntry(ChangeOneStepDelegate increment, ChangeOneStepDelegate decrement) { this.IncrementMethod = increment; this.DecrementMethod = decrement; }