Skip to content

Commit 6b5884f

Browse files
committed
Fixes #110
1 parent 28c0959 commit 6b5884f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chapters/intro_to_graphics/chapter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,11 @@ ofVec2f lastPoint;
471471
float minDistance;
472472
```
473473

474-
Initialize `minDistance` and `currentedAddingPoints` in `setup()`:
474+
Initialize `minDistance` and `leftMouseButtonPressed` in `setup()`:
475475

476476
```cpp
477477
minDistance = 10;
478-
currentlyAddingPoints = false;
478+
leftMouseButtonPressed = false;
479479
```
480480

481481
Now we are going to take advantage of two new functions - [`mousePressed(int x, int y, int button)`](http://www.openframeworks.cc/documentation/application/ofBaseApp.html#!show_mousePressed "mousePressed openFrameworks Documentation") and [`mouseReleased(int x, int y, int button)`](http://www.openframeworks.cc/documentation/application/ofBaseApp.html#show_mouseReleased "mouseReleased openFrameworks Documentation"). These are functions that are built into your application by default. They are event handling functions, so whenever a mouse button is pressed, whatever code you put into `mousePressed(...)` is called. It's important to note that `mousePressed(...)` is only called when the mouse button is initially pressed. No matter how long we hold the mouse button down, the function is still only called once. The same goes for `mouseReleased(...)`.

0 commit comments

Comments
 (0)