Skip to content

Commit aa7d279

Browse files
committed
reformatted to fit character limit
1 parent 85ef531 commit aa7d279

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/reST/ref/window.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
:param bool always_on_top: Create a window that is always presented above
4545
others.
4646

47-
Event behavior if one Window is created: When the close button is pressed, the ``QUIT`` event will be sent to the event queue.
47+
Event behavior if one Window is created: When the close button is pressed,
48+
the ``QUIT`` event will be sent to the event queue.
4849
.. code-block:: python
4950
5051
import pygame
@@ -57,7 +58,10 @@
5758
pygame.quit()
5859
raise SystemExit
5960
60-
Event behavior if multiple Windows are created: When the close button is pressed, a ``WINDOWCLOSE`` event is sent. You need to explicitly destroy the window. Note that the event ``QUIT`` will only be sent if all Window has been destroyed.
61+
Event behavior if multiple Windows are created: When the close button is
62+
pressed, a ``WINDOWCLOSE`` event is sent. You need to explicitly destroy
63+
the window. Note that the event ``QUIT`` will only be sent if all Window
64+
has been destroyed.
6165
.. code-block:: python
6266
6367
import pygame
@@ -68,7 +72,8 @@
6872
while True:
6973
for event in pygame.event.get():
7074
if event.type == pygame.WINDOWCLOSE:
71-
print(f"WINDOWCLOSE event sent to Window #{event.window.id}.")
75+
id = event.window.id
76+
print(f"WINDOWCLOSE event sent to Window #{id}.")
7277
event.window.destroy()
7378
7479
if event.type == pygame.QUIT:

0 commit comments

Comments
 (0)