kopia lustrzana https://github.com/peterhinch/micropython-micro-gui
commit
8e3d8a04c3
|
@ -1867,6 +1867,8 @@ Optional keyword only arguments:
|
|||
* `args=[]` A list/tuple of arguments for above callback.
|
||||
* `value=0.0` The initial value: slider will be at the bottom (v), left (h).
|
||||
* `active=True` Determines whether the control can accept user input.
|
||||
* `min_delta=0.01` Minimim value increment
|
||||
* `max_delta=0.1` Maximum value increment (long button presses)
|
||||
|
||||
Methods:
|
||||
* `greyed_out` Optional Boolean argument `val=None`. If `None` returns the
|
||||
|
|
|
@ -22,9 +22,10 @@ class Slider(LinearIO):
|
|||
height=100, width=20, divisions=10, legends=None,
|
||||
fgcolor=None, bgcolor=None, fontcolor=None, bdcolor=None,
|
||||
slotcolor=None, prcolor=None,
|
||||
callback=dolittle, args=[], value=0.0, active=True):
|
||||
callback=dolittle, args=[], value=0.0, active=True,
|
||||
min_delta=0.01, max_delta=0.1):
|
||||
width &= 0xfe # ensure divisible by 2
|
||||
super().__init__(writer, row, col, height, width, fgcolor, bgcolor, bdcolor, value, active, prcolor)
|
||||
super().__init__(writer, row, col, height, width, fgcolor, bgcolor, bdcolor, value, active, prcolor, min_delta, max_delta)
|
||||
super()._set_callbacks(callback, args)
|
||||
self.divisions = divisions
|
||||
self.legends = legends
|
||||
|
@ -96,9 +97,10 @@ class HorizSlider(LinearIO):
|
|||
height=20, width=100, divisions=10, legends=None,
|
||||
fgcolor=None, bgcolor=None, fontcolor=None, bdcolor=None,
|
||||
slotcolor=None, prcolor=None,
|
||||
callback=dolittle, args=[], value=0.0, active=True):
|
||||
callback=dolittle, args=[], value=0.0, active=True,
|
||||
min_delta=0.01, max_delta=0.1):
|
||||
height &= 0xfe # ensure divisible by 2
|
||||
super().__init__(writer, row, col, height, width, fgcolor, bgcolor, bdcolor, value, active, prcolor)
|
||||
super().__init__(writer, row, col, height, width, fgcolor, bgcolor, bdcolor, value, active, prcolor, min_delta, max_delta)
|
||||
super()._set_callbacks(callback, args)
|
||||
self.divisions = divisions
|
||||
self.legends = legends
|
||||
|
|
Ładowanie…
Reference in New Issue