<Surf> = <Font>.render(text, antialias, color) <spanclass="hljs-comment"># Background color can be specified at the end.</span>
<Surf> = <Font>.render(text, antialias, color) <spanclass="hljs-comment"># Background color can be specified at the end.</span>
</code></pre></div>
</code></pre></div>
<div><h3id="sound">Sound</h3><pre><codeclass="python language-python hljs"><Sound> = pg.mixer.Sound(<path/file/bytes>) <spanclass="hljs-comment"># Loads the WAV file or array of signed shorts.</span>
<Sound>.play()<spanclass="hljs-comment"># Starts playing the sound.</span>
<div><h3id="sound">Sound</h3><pre><codeclass="python language-python hljs"><Sound> = pg.mixer.Sound(<path/file/bytes>) <spanclass="hljs-comment"># Loads WAV file or array of signed shorts.</span>
<Sound>.play/stop() <spanclass="hljs-comment"># Also <Sound>.set_volume(<float>).</span>