diff --git a/README.md b/README.md index 393da6e..1308bee 100644 --- a/README.md +++ b/README.md @@ -3045,14 +3045,14 @@ rect(, color, , width=0) # Also polygon(, color, po ### Font ```python - = pg.font.Font(, size) # Loads the TTF file. Pass None for default. + = pg.font.Font(, size) # Loads TTF file. Pass None for default font. = .render(text, antialias, color) # Background color can be specified at the end. ``` ### Sound ```python - = pg.mixer.Sound() # Loads the WAV file or array of signed shorts. -.play() # Starts playing the sound. + = pg.mixer.Sound() # Loads WAV file or array of signed shorts. +.play/stop() # Also .set_volume(). ``` ### Basic Mario Brothers Example diff --git a/index.html b/index.html index bc53873..ae5be46 100644 --- a/index.html +++ b/index.html @@ -2482,12 +2482,12 @@ line(<Surf>, color, (x1, y1), (x2, y2), width) # Also ellipse(<Surf>, color, <Rect>, width=0). rect(<Surf>, color, <Rect>, width=0) # Also polygon(<Surf>, color, points, width=0). -

Font

<Font> = pg.font.Font(<path/file>, size)        # Loads the TTF file. Pass None for default.
+

Font

<Font> = pg.font.Font(<path/file>, size)        # Loads TTF file. Pass None for default font.
 <Surf> = <Font>.render(text, antialias, color)  # Background color can be specified at the end.
 
-

Sound

<Sound> = pg.mixer.Sound(<path/file/bytes>)     # Loads the WAV file or array of signed shorts.
-<Sound>.play()                                  # Starts playing the sound.
+

Sound

<Sound> = pg.mixer.Sound(<path/file/bytes>)     # Loads WAV file or array of signed shorts.
+<Sound>.play/stop()                             # Also <Sound>.set_volume(<float>).
 

Basic Mario Brothers Example

import collections, dataclasses, enum, io, itertools as it, pygame as pg, urllib.request