Browse Source

Input, Pygame

pull/115/head
Jure Šorn 3 years ago
parent
commit
ac54ab1e1f
2 changed files with 6 additions and 6 deletions
  1. 4
      README.md
  2. 8
      index.html

4
README.md

@ -1489,7 +1489,7 @@ Input
```
* **Trailing newline gets stripped.**
* **Prompt string is printed to the standard output before reading input.**
* **Raises EOFError when user hits EOF (ctrl-d/z) or input stream gets exhausted.**
* **Raises EOFError when user hits EOF (ctrl-d/ctrl-z) or input stream gets exhausted.**
Command Line Arguments
@ -2952,7 +2952,7 @@ while all(event.type != pg.QUIT for event in pg.event.get()):
**Object for representing images.**
```python
<Surf> = pg.display.set_mode((width, height)) # Returns display surface.
<Surf> = pg.Surface((width, height) [, flags]) # New RGB surface. RGBA if `flags=pg.SRCALPHA`.
<Surf> = pg.Surface((width, height), flags=0) # New RGB surface. RGBA if `flags=pg.SRCALPHA`.
<Surf> = pg.image.load('<path>') # Loads the image. Format depends on source.
<Surf> = <Surf>.subsurface(<Rect>) # Returns a subsurface.
```

8
index.html

@ -226,7 +226,7 @@ pre.prettyprint {
<body>
<header>
<aside>October 8, 2021</aside>
<aside>October 13, 2021</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</header>
@ -1422,7 +1422,7 @@ pprint(&lt;collection&gt;, width=<span class="hljs-number">80</span>, depth=<spa
<ul>
<li><strong>Trailing newline gets stripped.</strong></li>
<li><strong>Prompt string is printed to the standard output before reading input.</strong></li>
<li><strong>Raises EOFError when user hits EOF (ctrl-d/z) or input stream gets exhausted.</strong></li>
<li><strong>Raises EOFError when user hits EOF (ctrl-d/ctrl-z) or input stream gets exhausted.</strong></li>
</ul>
<div><h2 id="commandlinearguments"><a href="#commandlinearguments" name="commandlinearguments">#</a>Command Line Arguments</h2><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> sys
scripts_path = sys.argv[<span class="hljs-number">0</span>]
@ -2540,7 +2540,7 @@ rect = pg.Rect(<span class="hljs-number">240</span>, <span class="hljs-number">2
&lt;list&gt; = &lt;Rect&gt;.collidelistall(&lt;list_of_Rect&gt;) <span class="hljs-comment"># Returns indexes of all colliding Rects.</span>
</code></pre>
<div><h3 id="surface">Surface</h3><p><strong>Object for representing images.</strong></p><pre><code class="python language-python hljs">&lt;Surf&gt; = pg.display.set_mode((width, height)) <span class="hljs-comment"># Returns display surface.</span>
&lt;Surf&gt; = pg.Surface((width, height) [, flags]) <span class="hljs-comment"># New RGB surface. RGBA if `flags=pg.SRCALPHA`.</span>
&lt;Surf&gt; = pg.Surface((width, height), flags=<span class="hljs-number">0</span>) <span class="hljs-comment"># New RGB surface. RGBA if `flags=pg.SRCALPHA`.</span>
&lt;Surf&gt; = pg.image.load(<span class="hljs-string">'&lt;path&gt;'</span>) <span class="hljs-comment"># Loads the image. Format depends on source.</span>
&lt;Surf&gt; = &lt;Surf&gt;.subsurface(&lt;Rect&gt;) <span class="hljs-comment"># Returns a subsurface.</span>
</code></pre></div>
@ -3007,7 +3007,7 @@ $ pyinstaller script.py --add-data '&lt;path&gt;:.' <span class="hljs-comment">
<footer>
<aside>October 8, 2021</aside>
<aside>October 13, 2021</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</footer>

Loading…
Cancel
Save