kopia lustrzana https://github.com/peterhinch/micropython-micro-gui
README: add Adjuster images.
rodzic
5f4369fbb3
commit
8d76bd8cd4
|
@ -2304,6 +2304,11 @@ value changes. This enables dynamic color change.
|
|||
```python
|
||||
from gui.widgets.adjuster import Adjuster
|
||||
```
|
||||
![Image](./images/adjusters.jpg) ![Image](./images/adj_vector.jpg)
|
||||
|
||||
Four examples paired with `Label`s. An example of two `Adjuster` instances
|
||||
setting a vector.
|
||||
|
||||
The `Adjuster` is a space saving version of the `Knob`. It is normally paired
|
||||
with a `Label` which provides user feedback of the value. It has a range of
|
||||
0.0 to 1.0 and a visual arc of 270°. User code can provide arbitrary scaling
|
||||
|
|
|
@ -27,7 +27,7 @@ class BaseScreen(Screen):
|
|||
wri = CWriter(ssd, font, GREEN, BLACK)
|
||||
col = 2
|
||||
row = 2
|
||||
self.dial = Dial(wri, row, col, bdcolor=None)
|
||||
self.dial = Dial(wri, row, col, bdcolor=None, style=Dial.COMPASS)
|
||||
self.vec = Pointer(self.dial)
|
||||
a = Adjuster(wri, row, self.dial.mcol + 2, fgcolor=BLUE, callback=self.phi_cb)
|
||||
Label(wri, row, a.mcol + 2, "ϕ", fgcolor=BLUE)
|
||||
|
|
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 42 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 74 KiB |
Ładowanie…
Reference in New Issue