Ejemplo n.º 1
0
#Loop until the user clicks the close button.
done = False
clock = pygame.time.Clock()

lamp1 = Dashboard.Lamp(ws, (300, 300), name="Nandin")


def teste(obj):
    lamp1.set_state(obj)


bt = Dashboard.ButtonONOFF(ws, (100, 300), callback=teste)
raio = 60
x = 2 * raio + 5
g1 = Dashboard.Gauge(ws, (x, 100), raio)
g2 = Dashboard.Gauge(ws, (2 * x, 100), raio, display=Dashboard.Gauge.ARROW)
g2.set_max(300)

g3 = Dashboard.Gauge(ws, (3 * x, 100),
                     raio,
                     color=(0, 200, 0),
                     display=Dashboard.Gauge.ARROW,
                     thickness=10)
g3.set_max(270)

g4 = Dashboard.Gauge(ws, (4 * x, 100),
                     raio,
                     color=(200, 20, 0),
                     display=Dashboard.Gauge.ARROW,
                     thickness=2)