jdf / processing-py-site

Site for processing.py.
MIT License
197 stars 52 forks source link

Tutorials - Interactivity - Mouse buttons example 3 #155

Closed brunoperdigao closed 4 years ago

brunoperdigao commented 4 years ago

In this example, "true" is written in lower case, which causes error:

def setup():
    size(100, 100)

def draw():
    if (mousePressed == true):
        if (mouseButton == LEFT):
            fill(0)   # Black
        elif (mouseButton == RIGHT):
            fill(255)   # White
    else:
        fill(126)   # Gray

    rect(25, 25, 50, 50)
jeremydouglass commented 4 years ago

Thanks for reporting this bug in the tutorial!