Skip to content

Commit df6dcf7

Browse files
authored
Merge pull request #572 from hx2A/systemvariable2
change system variable to variable
2 parents bc9a968 + ce756c4 commit df6dcf7

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

py5_docs/Reference/api_en/Sketch_frame_count.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pclass = PApplet
77
processing_name = frameCount
88

99
@@ description
10-
The system variable `frame_count` contains the number of frames that have been displayed since the program started. Inside `setup()` the value is 0. Inside the first execution of `draw()` it is 1, and it will increase by 1 for every execution of `draw()` after that.
10+
The variable `frame_count` contains the number of frames that have been displayed since the program started. Inside `setup()` the value is 0. Inside the first execution of `draw()` it is 1, and it will increase by 1 for every execution of `draw()` after that.
1111

1212
@@ example
1313
def setup():

py5_docs/Reference/api_en/Sketch_key.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pclass = PApplet
77
processing_name = key
88

99
@@ description
10-
The system variable `key` always contains the value of the most recent key on the keyboard that was used (either pressed or released).
10+
The variable `key` always contains the value of the most recent key on the keyboard that was used (either pressed or released).
1111

1212
For non-ASCII keys, use the [](sketch_key_code) variable. The keys included in the ASCII specification (`BACKSPACE`, `TAB`, `ENTER`, `RETURN`, `ESC`, and `DELETE`) do not require checking to see if the key is coded, and you should simply use the `key` variable instead of [](sketch_key_code). If you're making cross-platform projects, note that the `ENTER` key is commonly used on PCs and Unix and the `RETURN` key is used instead on Macintosh. Check for both `ENTER` and `RETURN` to make sure your program will work for all platforms.
1313

py5_docs/Reference/api_en/Sketch_mouse_button.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pclass = PApplet
77
processing_name = mouseButton
88

99
@@ description
10-
When a mouse button is pressed, the value of the system variable `mouse_button` is set to either `LEFT`, `RIGHT`, or `CENTER`, depending on which button is pressed. (If no button is pressed, `mouse_button` may be reset to `0`. For that reason, it's best to use `mouse_pressed` first to test if any button is being pressed, and only then test the value of `mouse_button`, as shown in the examples.)
10+
When a mouse button is pressed, the variable `mouse_button` is set to either `LEFT`, `RIGHT`, or `CENTER`, depending on which button is pressed. (If no button is pressed, `mouse_button` may be reset to `0`. For that reason, it's best to use `mouse_pressed` first to test if any button is being pressed, and only then test the value of `mouse_button`, as shown in the examples.)
1111

1212
@@ example
1313
# click within the image and press

py5_docs/Reference/api_en/Sketch_mouse_x.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pclass = PApplet
77
processing_name = mouseX
88

99
@@ description
10-
The system variable `mouse_x` always contains the current horizontal coordinate of the mouse.
10+
The variable `mouse_x` always contains the current horizontal coordinate of the mouse.
1111

1212
Note that py5 can only track the mouse position when the pointer is over the current window. The default value of `mouse_x` is `0`, so `0` will be returned until the mouse moves in front of the Sketch window. (This typically happens when a Sketch is first run.) Once the mouse moves away from the window, `mouse_x` will continue to report its most recent position.
1313

py5_docs/Reference/api_en/Sketch_mouse_y.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pclass = PApplet
77
processing_name = mouseY
88

99
@@ description
10-
The system variable `mouse_y` always contains the current vertical coordinate of the mouse.
10+
The variable `mouse_y` always contains the current vertical coordinate of the mouse.
1111

1212
Note that py5 can only track the mouse position when the pointer is over the current window. The default value of `mouse_y` is `0`, so `0` will be returned until the mouse moves in front of the Sketch window. (This typically happens when a Sketch is first run.) Once the mouse moves away from the window, `mouse_y` will continue to report its most recent position.
1313

py5_docs/Reference/api_en/Sketch_pmouse_x.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pclass = PApplet
77
processing_name = pmouseX
88

99
@@ description
10-
The system variable `pmouse_x` always contains the horizontal position of the mouse in the frame previous to the current frame.
10+
The variable `pmouse_x` always contains the horizontal position of the mouse in the frame previous to the current frame.
1111

1212
You may find that `pmouse_x` and [](sketch_pmouse_y) have different values when referenced inside of `draw()` and inside of mouse events like `mouse_pressed()` and `mouse_moved()`. Inside `draw()`, `pmouse_x` and [](sketch_pmouse_y) update only once per frame (once per trip through the `draw()` loop). But inside mouse events, they update each time the event is called. If these values weren't updated immediately during mouse events, then the mouse position would be read only once per frame, resulting in slight delays and choppy interaction. If the mouse variables were always updated multiple times per frame, then something like `line(pmouse_x, pmouse_y, mouse_x, mouse_y)` inside `draw()` would have lots of gaps, because `pmouse_x` may have changed several times in between the calls to [](sketch_line).
1313

py5_docs/Reference/api_en/Sketch_pmouse_y.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pclass = PApplet
77
processing_name = pmouseY
88

99
@@ description
10-
The system variable `pmouse_y` always contains the vertical position of the mouse in the frame previous to the current frame.
10+
The variable `pmouse_y` always contains the vertical position of the mouse in the frame previous to the current frame.
1111

1212
For more detail on how `pmouse_y` is updated inside of mouse events and `draw()`, see the reference for [](sketch_pmouse_x).
1313

0 commit comments

Comments
 (0)