Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LED0 = [200, 200, 0]
- # [coordX, coordY,
- boton0 = [100, 100, 50]
- def setup():
- size(500, 500)
- def draw():
- background(0)
- pintarLED(LED0)
- pintarBoton(boton0)
- # pintarBoton(boton1)
- # pintarBoton(boton2)
- # pintarBoton(boton3)
- def pintarLED(a):
- fill(128)
- circle(a[0], a[1], 50)
- def pintarBoton(datos):
- fill(180,0,0)
- square(datos[0], datos[1], datos[2])
- if mousePressed:
- if mouseX > datos[0] and mouseX < datos[0] + datos[2] and mouseY > datos[1] and mouseY < datos[1] + datos[2]:
- fill(0,180,180)
- square(datos[0], datos[1], datos[2]*0.8)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement