You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reST/ref/window.rst
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,8 @@
44
44
:param bool always_on_top: Create a window that is always presented above
45
45
others.
46
46
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.
48
49
.. code-block:: python
49
50
50
51
import pygame
@@ -57,7 +58,10 @@
57
58
pygame.quit()
58
59
raiseSystemExit
59
60
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.
61
65
.. code-block:: python
62
66
63
67
import pygame
@@ -68,7 +72,8 @@
68
72
whileTrue:
69
73
for event in pygame.event.get():
70
74
if event.type == pygame.WINDOWCLOSE:
71
-
print(f"WINDOWCLOSE event sent to Window #{event.window.id}.")
0 commit comments