Interval Documentation¶
Interval class¶
Base Class
This is a base class and should not be instantiated directly.
Inheritance
Interval class inherits from Numeric class.
Interval methods¶
- Interval.set_limits(lower_bound, upper_bound, step, color_limits=None)¶
Use this to set the interval properties.
- Parameters:
lower_bound (int or float) – The value to start the interval
upper_bound (int or float) – The value to end the interval
step (int or float) – The separation between two values on the interval
color_limits (tuple) – A pair of values to create color zones in the interval
- Return type:
NoneType
Interval properties¶
- property Interval.step¶
Get the step (int or float).
Default value is 1.
- property Interval.range¶
Get the list with all values in the range (list).
Default value is a integer range from 0 to 100 with step 1.
- property Interval.color_limits¶
Get a pair of values for the color limits (tuple).
Default value is None.
If
pygameyagui.Interval.use_color_limitsis set to True, then the interval will be divided in three zones:Green Zone is for values between lower_bound and color_limits[0].
Yellow Zone is for values between color_limits[0] and color_limits[1].
Red Zone is for values between color_limits[1] and upper_bound.
- property Interval.use_color_limits¶
Get or set if the interval will use color limits (bool).
Default value is False.
See also:
pygameyagui.Interval.color_limits