Você está na página 1de 20

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.

org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Functions &mdash; The Pygame SGE 0.8.0 documentation</title> <link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '', VERSION: '0.8.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="The Pygame SGE 0.8.0 documentation" href="index.html" /> <link rel="prev" title="sge.View" href="View.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="View.html" title="sge.View" accesskey="P">previous</a> |</li> <li><a href="index.html">The Pygame SGE 0.8.0 documentation</a> &raquo;< /li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="functions"> <h1>Functions<a class="headerlink" href="#functions" title="Permalink to this he adline"></a></h1> <dl class="function"> <dt id="sge.show_message"> <tt class="descclassname">sge.</tt><tt class="descname">show_message</tt><big>(< /big><em>text</em>, <em>buttons=('OK'</em>, <em>)</em>, <em>default=0</em><big>) </big><a class="headerlink" href="#sge.show_message" title="Permalink to this de finition"></a></dt>

<dd><p>Show a dialog box and return the button pressed.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">text</span></tt> &#8211; The message to show in the dialog box as a string.</li> <li><tt class="docutils literal"><span class="pre">buttons</span></tt> &#8211; A list or tuple of strings to put in each of the buttons from left to right.</li> <li><tt class="docutils literal"><span class="pre">default</span></tt> &#8211; T he number of the button to select by default, where <tt class="docutils literal"><span class="pre">0</span></tt> is the first button.</li> </ul> <p>While the dialog box is being shown, all events are stopped.</p> <p>The return value is the number of the button which was pressed, where <tt class="docutils literal"><span class="pre">0</span></tt> is the first button. If the dialog box was closed in any way other than clicking on one of the buttons (including by clicking an &#8220;X&#8221; button or similar), <tt class="xref py py-const docu tils literal"><span class="pre">None</span></tt> is returned.</p> </dd></dl> <dl class="function"> <dt id="sge.get_text_entry"> <tt class="descclassname">sge.</tt><tt class="descname">get_text_entry</tt><big> (</big><em>text</em>, <em>default=''</em><big>)</big><a class="headerlink" href= "#sge.get_text_entry" title="Permalink to this definition"></a></dt> <dd><p>Show a text entry dialog box and return the text entered.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">text</span></tt> &#8211; The message to show in the dialog box as a string.</li> <li><tt class="docutils literal"><span class="pre">default</span></tt> &#8211; T he text to put in the text entry field initially.</li> </ul> <p>The text entry dialog box is mostly the same as the regular dialog box &#8211; see the documentation for <a class="reference internal" href="#sge.s how_message" title="sge.show_message"><tt class="xref py py-func docutils litera l"><span class="pre">sge.show_message()</span></tt></a> for more information &#8211; but there are some key differences:</p> <p>There is always an OK button and a Cancel button. If the OK button is clicked, the text in the text entry field is returned. If the Cancel button is clicked, <tt class="xref py py-const docutils literal"><span cl ass="pre">None</span></tt> is returned.</p> </dd></dl> <dl class="function"> <dt id="sge.get_key_pressed"> <tt class="descclassname">sge.</tt><tt class="descname">get_key_pressed</tt><big >(</big><em>key</em><big>)</big><a class="headerlink" href="#sge.get_key_pressed " title="Permalink to this definition"></a></dt> <dd><p>Return whether or not a key is pressed.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">key</span></tt> &#8211; The i dentifier string of the key to check; see below for a table of the identifier strings.</li> </ul> <table border="1" class="docutils"> <colgroup>

<col width="33%" /> <col width="38%" /> <col width="28%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Key Name</th> <th class="head">Identifier String</th> <th class="head">Unicode Character</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>0</td> <td><tt class="docutils literal"><span class="pre">&quot;0&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;0&quot;</span></tt></td > </tr> <tr class="row-odd"><td>1</td> <td><tt class="docutils literal"><span class="pre">&quot;1&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;1&quot;</span></tt></td > </tr> <tr class="row-even"><td>2</td> <td><tt class="docutils literal"><span class="pre">&quot;2&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;2&quot;</span></tt></td > </tr> <tr class="row-odd"><td>3</td> <td><tt class="docutils literal"><span class="pre">&quot;3&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;3&quot;</span></tt></td > </tr> <tr class="row-even"><td>4</td> <td><tt class="docutils literal"><span class="pre">&quot;4&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;4&quot;</span></tt></td > </tr> <tr class="row-odd"><td>5</td> <td><tt class="docutils literal"><span class="pre">&quot;5&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;5&quot;</span></tt></td > </tr> <tr class="row-even"><td>6</td> <td><tt class="docutils literal"><span class="pre">&quot;6&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;6&quot;</span></tt></td > </tr> <tr class="row-odd"><td>7</td> <td><tt class="docutils literal"><span class="pre">&quot;7&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;7&quot;</span></tt></td > </tr> <tr class="row-even"><td>8</td>

<td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-odd"><td>9</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-even"><td>A</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-odd"><td>B</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-even"><td>C</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-odd"><td>D</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-even"><td>E</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-odd"><td>F</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-even"><td>G</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-odd"><td>H</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-even"><td>I</td>

class="pre">&quot;8&quot;</span></tt></td class="pre">&quot;8&quot;</span></tt></td

class="pre">&quot;9&quot;</span></tt></td class="pre">&quot;9&quot;</span></tt></td

class="pre">&quot;a&quot;</span></tt></td class="pre">&quot;a&quot;</span></tt></td

class="pre">&quot;b&quot;</span></tt></td class="pre">&quot;b&quot;</span></tt></td

class="pre">&quot;c&quot;</span></tt></td class="pre">&quot;c&quot;</span></tt></td

class="pre">&quot;d&quot;</span></tt></td class="pre">&quot;d&quot;</span></tt></td

class="pre">&quot;e&quot;</span></tt></td class="pre">&quot;e&quot;</span></tt></td

class="pre">&quot;f&quot;</span></tt></td class="pre">&quot;f&quot;</span></tt></td

class="pre">&quot;g&quot;</span></tt></td class="pre">&quot;g&quot;</span></tt></td

class="pre">&quot;h&quot;</span></tt></td class="pre">&quot;h&quot;</span></tt></td

<td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-odd"><td>J</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-even"><td>K</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-odd"><td>L</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-even"><td>M</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-odd"><td>N</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-even"><td>O</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-odd"><td>P</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-even"><td>Q</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-odd"><td>R</td> <td><tt class="docutils literal"><span > <td><tt class="docutils literal"><span > </tr> <tr class="row-even"><td>S</td>

class="pre">&quot;i&quot;</span></tt></td class="pre">&quot;i&quot;</span></tt></td

class="pre">&quot;j&quot;</span></tt></td class="pre">&quot;j&quot;</span></tt></td

class="pre">&quot;k&quot;</span></tt></td class="pre">&quot;k&quot;</span></tt></td

class="pre">&quot;l&quot;</span></tt></td class="pre">&quot;l&quot;</span></tt></td

class="pre">&quot;m&quot;</span></tt></td class="pre">&quot;m&quot;</span></tt></td

class="pre">&quot;n&quot;</span></tt></td class="pre">&quot;n&quot;</span></tt></td

class="pre">&quot;o&quot;</span></tt></td class="pre">&quot;o&quot;</span></tt></td

class="pre">&quot;p&quot;</span></tt></td class="pre">&quot;p&quot;</span></tt></td

class="pre">&quot;q&quot;</span></tt></td class="pre">&quot;q&quot;</span></tt></td

class="pre">&quot;r&quot;</span></tt></td class="pre">&quot;r&quot;</span></tt></td

<td><tt class="docutils literal"><span class="pre">&quot;s&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;s&quot;</span></tt></td > </tr> <tr class="row-odd"><td>T</td> <td><tt class="docutils literal"><span class="pre">&quot;t&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;t&quot;</span></tt></td > </tr> <tr class="row-even"><td>U</td> <td><tt class="docutils literal"><span class="pre">&quot;u&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;u&quot;</span></tt></td > </tr> <tr class="row-odd"><td>V</td> <td><tt class="docutils literal"><span class="pre">&quot;v&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;v&quot;</span></tt></td > </tr> <tr class="row-even"><td>W</td> <td><tt class="docutils literal"><span class="pre">&quot;w&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;w&quot;</span></tt></td > </tr> <tr class="row-odd"><td>X</td> <td><tt class="docutils literal"><span class="pre">&quot;x&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;x&quot;</span></tt></td > </tr> <tr class="row-even"><td>Y</td> <td><tt class="docutils literal"><span class="pre">&quot;y&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;y&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Z</td> <td><tt class="docutils literal"><span class="pre">&quot;z&quot;</span></tt></td > <td><tt class="docutils literal"><span class="pre">&quot;z&quot;</span></tt></td > </tr> <tr class="row-even"><td>Period</td> <td><tt class="docutils literal"><span class="pre">&quot;period&quot;</span></tt ></td> <td><tt class="docutils literal"><span class="pre">&quot;.&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Comma</td> <td><tt class="docutils literal"><span class="pre">&quot;comma&quot;</span></tt> </td> <td><tt class="docutils literal"><span class="pre">&quot;,&quot;</span></tt></td > </tr> <tr class="row-even"><td>Less Than</td>

<td><tt class="docutils literal"><span class="pre">&quot;less_than&quot;</span>< /tt></td> <td><tt class="docutils literal"><span class="pre">&quot;&lt;&quot;</span></tt>< /td> </tr> <tr class="row-odd"><td>Greater Than</td> <td><tt class="docutils literal"><span class="pre">&quot;greater_than&quot;</spa n></tt></td> <td><tt class="docutils literal"><span class="pre">&quot;&gt;&quot;</span></tt>< /td> </tr> <tr class="row-even"><td>Forward Slash</td> <td><tt class="docutils literal"><span class="pre">&quot;slash&quot;</span></tt> </td> <td><tt class="docutils literal"><span class="pre">&quot;/&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Question Mark</td> <td><tt class="docutils literal"><span class="pre">&quot;question&quot;</span></ tt></td> <td><tt class="docutils literal"><span class="pre">&quot;?&quot;</span></tt></td > </tr> <tr class="row-even"><td>Apostrophe</td> <td><tt class="docutils literal"><span class="pre">&quot;apostrophe&quot;</span> </tt></td> <td><tt class="docutils literal"><span class="pre">&quot;'&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Quotation Mark</td> <td><tt class="docutils literal"><span class="pre">&quot;quote&quot;</span></tt> </td> <td><tt class="docutils literal"><span class="pre">'&quot;'</span></tt></td> </tr> <tr class="row-even"><td>Colon</td> <td><tt class="docutils literal"><span class="pre">&quot;colon&quot;</span></tt> </td> <td><tt class="docutils literal"><span class="pre">&quot;:&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Semicolon</td> <td><tt class="docutils literal"><span class="pre">&quot;semicolon&quot;</span>< /tt></td> <td><tt class="docutils literal"><span class="pre">&quot;;&quot;</span></tt></td > </tr> <tr class="row-even"><td>Exclamation Point</td> <td><tt class="docutils literal"><span class="pre">&quot;exclamation&quot;</span ></tt></td> <td><tt class="docutils literal"><span class="pre">&quot;!&quot;</span></tt></td > </tr> <tr class="row-odd"><td>At</td> <td><tt class="docutils literal"><span class="pre">&quot;at&quot;</span></tt></t d> <td><tt class="docutils literal"><span class="pre">&quot;&#64;&quot;</span></tt> </td> </tr> <tr class="row-even"><td>Hash</td> <td><tt class="docutils literal"><span class="pre">&quot;hash&quot;</span></tt><

/td> <td><tt class="docutils literal"><span class="pre">&quot;#&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Dollar Sign</td> <td><tt class="docutils literal"><span class="pre">&quot;dollar&quot;</span></tt ></td> <td><tt class="docutils literal"><span class="pre">&quot;$&quot;</span></tt></td > </tr> <tr class="row-even"><td>Carat</td> <td><tt class="docutils literal"><span class="pre">&quot;carat&quot;</span></tt> </td> <td><tt class="docutils literal"><span class="pre">&quot;^&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Ampersand</td> <td><tt class="docutils literal"><span class="pre">&quot;ampersand&quot;</span>< /tt></td> <td><tt class="docutils literal"><span class="pre">&quot;&amp;&quot;</span></tt> </td> </tr> <tr class="row-even"><td>Asterisk</td> <td><tt class="docutils literal"><span class="pre">&quot;asterisk&quot;</span></ tt></td> <td><tt class="docutils literal"><span class="pre">&quot;*&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Left Parenthesis</td> <td><tt class="docutils literal"><span class="pre">&quot;parenthesis_left&quot;< /span></tt></td> <td><tt class="docutils literal"><span class="pre">&quot;(&quot;</span></tt></td > </tr> <tr class="row-even"><td>Right Parenthesis</td> <td><tt class="docutils literal"><span class="pre">&quot;parenthesis_right&quot; </span></tt></td> <td><tt class="docutils literal"><span class="pre">&quot;)&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Hyphen</td> <td><tt class="docutils literal"><span class="pre">&quot;hyphen&quot;</span></tt ></td> <td><tt class="docutils literal"><span class="pre">&quot;-&quot;</span></tt></td > </tr> <tr class="row-even"><td>Underscore</td> <td><tt class="docutils literal"><span class="pre">&quot;underscore&quot;</span> </tt></td> <td><tt class="docutils literal"><span class="pre">&quot;_&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Plus Sign</td> <td><tt class="docutils literal"><span class="pre">&quot;plus&quot;</span></tt>< /td> <td><tt class="docutils literal"><span class="pre">&quot;+&quot;</span></tt></td > </tr> <tr class="row-even"><td>Equals Sign</td> <td><tt class="docutils literal"><span class="pre">&quot;equals&quot;</span></tt

></td> <td><tt class="docutils literal"><span class="pre">&quot;=&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Left Bracket</td> <td><tt class="docutils literal"><span class="pre">&quot;bracket_left&quot;</spa n></tt></td> <td><tt class="docutils literal"><span class="pre">&quot;[&quot;</span></tt></td > </tr> <tr class="row-even"><td>Right Bracket</td> <td><tt class="docutils literal"><span class="pre">&quot;bracket_right&quot;</sp an></tt></td> <td><tt class="docutils literal"><span class="pre">&quot;]&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Backslash</td> <td><tt class="docutils literal"><span class="pre">&quot;backslash&quot;</span>< /tt></td> <td><tt class="docutils literal"><span class="pre">&quot;\\&quot;</span></tt></t d> </tr> <tr class="row-even"><td>Backtick</td> <td><tt class="docutils literal"><span class="pre">&quot;backtick&quot;</span></ tt></td> <td><tt class="docutils literal"><span class="pre">&quot;`&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Keypad 0</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_0&quot;</span></tt>< /td> <td><tt class="docutils literal"><span class="pre">&quot;0&quot;</span></tt></td > </tr> <tr class="row-even"><td>Keypad 1</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_1&quot;</span></tt>< /td> <td><tt class="docutils literal"><span class="pre">&quot;1&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Keypad 2</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_2&quot;</span></tt>< /td> <td><tt class="docutils literal"><span class="pre">&quot;2&quot;</span></tt></td > </tr> <tr class="row-even"><td>Keypad 3</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_3&quot;</span></tt>< /td> <td><tt class="docutils literal"><span class="pre">&quot;3&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Keypad 4</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_4&quot;</span></tt>< /td> <td><tt class="docutils literal"><span class="pre">&quot;4&quot;</span></tt></td > </tr> <tr class="row-even"><td>Keypad 5</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_5&quot;</span></tt><

/td> <td><tt class="docutils literal"><span class="pre">&quot;5&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Keypad 6</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_6&quot;</span></tt>< /td> <td><tt class="docutils literal"><span class="pre">&quot;6&quot;</span></tt></td > </tr> <tr class="row-even"><td>Keypad 7</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_7&quot;</span></tt>< /td> <td><tt class="docutils literal"><span class="pre">&quot;7&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Keypad 8</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_8&quot;</span></tt>< /td> <td><tt class="docutils literal"><span class="pre">&quot;8&quot;</span></tt></td > </tr> <tr class="row-even"><td>Keypad 9</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_9&quot;</span></tt>< /td> <td><tt class="docutils literal"><span class="pre">&quot;9&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Keypad Decimal Point</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_point&quot;</span></ tt></td> <td><tt class="docutils literal"><span class="pre">&quot;.&quot;</span></tt></td > </tr> <tr class="row-even"><td>Keypad Plus</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_plus&quot;</span></t t></td> <td><tt class="docutils literal"><span class="pre">&quot;+&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Keypad Minus</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_minus&quot;</span></ tt></td> <td><tt class="docutils literal"><span class="pre">&quot;-&quot;</span></tt></td > </tr> <tr class="row-even"><td>Keypad Multiply</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_multiply&quot;</span ></tt></td> <td><tt class="docutils literal"><span class="pre">&quot;*&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Keypad Divide</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_divide&quot;</span>< /tt></td> <td><tt class="docutils literal"><span class="pre">&quot;/&quot;</span></tt></td > </tr> <tr class="row-even"><td>Keypad Equals</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_equals&quot;</span><

/tt></td> <td><tt class="docutils literal"><span class="pre">&quot;=&quot;</span></tt></td > </tr> <tr class="row-odd"><td>Keypad Enter</td> <td><tt class="docutils literal"><span class="pre">&quot;kp_enter&quot;</span></ tt></td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Left Arrow</td> <td><tt class="docutils literal"><span class="pre">&quot;left&quot;</span></tt>< /td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Right Arrow</td> <td><tt class="docutils literal"><span class="pre">&quot;right&quot;</span></tt> </td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Up Arrow</td> <td><tt class="docutils literal"><span class="pre">&quot;up&quot;</span></tt></t d> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Down Arrow</td> <td><tt class="docutils literal"><span class="pre">&quot;down&quot;</span></tt>< /td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Tab</td> <td><tt class="docutils literal"><span class="pre">&quot;tab&quot;</span></tt></ td> <td><tt class="docutils literal"><span class="pre">&quot;\t&quot;</span></tt></t d> </tr> <tr class="row-odd"><td>Space Bar</td> <td><tt class="docutils literal"><span class="pre">&quot;space&quot;</span></tt> </td> <td><tt class="docutils literal"><span class="pre">&quot;</span> <span class="pr e">&quot;</span></tt></td> </tr> <tr class="row-even"><td>Enter/Return</td> <td><tt class="docutils literal"><span class="pre">&quot;enter&quot;</span></tt> </td> <td><tt class="docutils literal"><span class="pre">&quot;\n&quot;</span></tt></t d> </tr> <tr class="row-odd"><td>Backspace</td> <td><tt class="docutils literal"><span class="pre">&quot;backspace&quot;</span>< /tt></td> <td><tt class="docutils literal"><span class="pre">&quot;\b&quot;</span></tt></t d> </tr> <tr class="row-even"><td>Delete</td> <td><tt class="docutils literal"><span class="pre">&quot;delete&quot;</span></tt ></td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Insert</td> <td><tt class="docutils literal"><span class="pre">&quot;insert&quot;</span></tt

></td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Left Shift</td> <td><tt class="docutils literal"><span class="pre">&quot;shift_left&quot;</span> </tt></td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Right Shift</td> <td><tt class="docutils literal"><span class="pre">&quot;shift_right&quot;</span ></tt></td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Left Ctrl</td> <td><tt class="docutils literal"><span class="pre">&quot;ctrl_left&quot;</span>< /tt></td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Right Ctrl</td> <td><tt class="docutils literal"><span class="pre">&quot;ctrl_right&quot;</span> </tt></td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Left Alt</td> <td><tt class="docutils literal"><span class="pre">&quot;alt_left&quot;</span></ tt></td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Right Alt</td> <td><tt class="docutils literal"><span class="pre">&quot;alt_right&quot;</span>< /tt></td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Left Super</td> <td><tt class="docutils literal"><span class="pre">&quot;super_left&quot;</span> </tt></td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Right Super</td> <td><tt class="docutils literal"><span class="pre">&quot;super_right&quot;</span ></tt></td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Caps Lock</td> <td><tt class="docutils literal"><span class="pre">&quot;caps_lock&quot;</span>< /tt></td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Home</td> <td><tt class="docutils literal"><span class="pre">&quot;home&quot;</span></tt>< /td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>End</td> <td><tt class="docutils literal"><span class="pre">&quot;end&quot;</span></tt></ td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Page Up</td> <td><tt class="docutils literal"><span class="pre">&quot;pageup&quot;</span></tt

></td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Page Down</td> <td><tt class="docutils literal"><span class="pre">&quot;pagedown&quot;</span></ tt></td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Pause</td> <td><tt class="docutils literal"><span class="pre">&quot;pause&quot;</span></tt> </td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Break</td> <td><tt class="docutils literal"><span class="pre">&quot;break&quot;</span></tt> </td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Print Screen</td> <td><tt class="docutils literal"><span class="pre">&quot;print_screen&quot;</spa n></tt></td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>SysRq</td> <td><tt class="docutils literal"><span class="pre">&quot;sysrq&quot;</span></tt> </td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Clear</td> <td><tt class="docutils literal"><span class="pre">&quot;clear&quot;</span></tt> </td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Menu</td> <td><tt class="docutils literal"><span class="pre">&quot;menu&quot;</span></tt>< /td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Mode</td> <td><tt class="docutils literal"><span class="pre">&quot;mode&quot;</span></tt>< /td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Power</td> <td><tt class="docutils literal"><span class="pre">&quot;power&quot;</span></tt> </td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>Scroll Lock</td> <td><tt class="docutils literal"><span class="pre">&quot;scroll_lock&quot;</span ></tt></td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>Esc</td> <td><tt class="docutils literal"><span class="pre">&quot;escape&quot;</span></tt ></td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>F1</td> <td><tt class="docutils literal"><span class="pre">&quot;f1&quot;</span></tt></t

d> <td>&nbsp;</td> </tr> <tr class="row-even"><td>F2</td> <td><tt class="docutils literal"><span d> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>F3</td> <td><tt class="docutils literal"><span d> <td>&nbsp;</td> </tr> <tr class="row-even"><td>F4</td> <td><tt class="docutils literal"><span d> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>F5</td> <td><tt class="docutils literal"><span d> <td>&nbsp;</td> </tr> <tr class="row-even"><td>F6</td> <td><tt class="docutils literal"><span d> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>F7</td> <td><tt class="docutils literal"><span d> <td>&nbsp;</td> </tr> <tr class="row-even"><td>F8</td> <td><tt class="docutils literal"><span d> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>F9</td> <td><tt class="docutils literal"><span d> <td>&nbsp;</td> </tr> <tr class="row-even"><td>F10</td> <td><tt class="docutils literal"><span td> <td>&nbsp;</td> </tr> <tr class="row-odd"><td>F11</td> <td><tt class="docutils literal"><span td> <td>&nbsp;</td> </tr> <tr class="row-even"><td>F12</td> <td><tt class="docutils literal"><span td> <td>&nbsp;</td> </tr> </tbody> </table>

class="pre">&quot;f2&quot;</span></tt></t

class="pre">&quot;f3&quot;</span></tt></t

class="pre">&quot;f4&quot;</span></tt></t

class="pre">&quot;f5&quot;</span></tt></t

class="pre">&quot;f6&quot;</span></tt></t

class="pre">&quot;f7&quot;</span></tt></t

class="pre">&quot;f8&quot;</span></tt></t

class="pre">&quot;f9&quot;</span></tt></t

class="pre">&quot;f10&quot;</span></tt></

class="pre">&quot;f11&quot;</span></tt></

class="pre">&quot;f12&quot;</span></tt></

</dd></dl> <dl class="function"> <dt id="sge.get_mouse_button_pressed"> <tt class="descclassname">sge.</tt><tt class="descname">get_mouse_button_pressed </tt><big>(</big><em>button</em><big>)</big><a class="headerlink" href="#sge.get _mouse_button_pressed" title="Permalink to this definition"></a></dt> <dd><p>Return whether or not a mouse button is pressed.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">button</span></tt> &#8211; Th e identifier string of the mouse button to check; see below for a table of the identifier strings.</li> </ul> <table border="1" class="docutils"> <colgroup> <col width="56%" /> <col width="44%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Mouse Button Name</th> <th class="head">Identifier String</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Left mouse button</td> <td><tt class="docutils literal"><span class="pre">&quot;left&quot;</span></tt>< /td> </tr> <tr class="row-odd"><td>Right mouse button</td> <td><tt class="docutils literal"><span class="pre">&quot;right&quot;</span></tt> </td> </tr> <tr class="row-even"><td>Middle mouse button</td> <td><tt class="docutils literal"><span class="pre">&quot;middle&quot;</span></tt ></td> </tr> <tr class="row-odd"><td>Mouse wheel up</td> <td><tt class="docutils literal"><span class="pre">&quot;wheel_up&quot;</span></ tt></td> </tr> <tr class="row-even"><td>Mouse wheel down</td> <td><tt class="docutils literal"><span class="pre">&quot;wheel_down&quot;</span> </tt></td> </tr> <tr class="row-odd"><td>Mouse wheel tilt left</td> <td><tt class="docutils literal"><span class="pre">&quot;wheel_left&quot;</span> </tt></td> </tr> <tr class="row-even"><td>Mouse wheel tilt right</td> <td><tt class="docutils literal"><span class="pre">&quot;wheel_right&quot;</span ></tt></td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="sge.get_joystick_axis"> <tt class="descclassname">sge.</tt><tt class="descname">get_joystick_axis</tt><b

ig>(</big><em>joystick</em>, <em>axis</em><big>)</big><a class="headerlink" href ="#sge.get_joystick_axis" title="Permalink to this definition"></a></dt> <dd><p>Return the position of a joystick axis.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">joystick</span></tt> &#8211; The number of the joystick to check, where <tt class="docutils literal"><span cl ass="pre">0</span></tt> is the first joystick, or the name of the joystick to check.</li> <li><tt class="docutils literal"><span class="pre">axis</span></tt> &#8211; The number of the axis to check, where <tt class="docutils literal"><span class="pre ">0</span></tt> is the first axis of the joystick.</li> </ul> <p>Return a float from <tt class="docutils literal"><span class="pre">-1</span>< /tt> to <tt class="docutils literal"><span class="pre">1</span></tt>, where <tt class="docutils literal"><span class="pre">0</span></tt> is centered, <tt class= "docutils literal"><span class="pre">-1</span></tt> is all the way to the left or up, and <tt class="docutils literal"><span class=" pre">1</span></tt> is all the way to the right or down. Return <tt class="docutils literal"><span class="pre">0</span></ tt> if the requested joystick or axis does not exist.</p> </dd></dl> <dl class="function"> <dt id="sge.get_joystick_hat"> <tt class="descclassname">sge.</tt><tt class="descname">get_joystick_hat</tt><bi g>(</big><em>joystick</em>, <em>hat</em><big>)</big><a class="headerlink" href=" #sge.get_joystick_hat" title="Permalink to this definition"></a></dt> <dd><p>Return the position of a joystick HAT.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">joystick</span></tt> &#8211; The number of the joystick to check, where <tt class="docutils literal"><span cl ass="pre">0</span></tt> is the first joystick, or the name of the joystick to check.</li> <li><tt class="docutils literal"><span class="pre">hat</span></tt> &#8211; The n umber of the HAT to check, where <tt class="docutils literal"><span class="pre"> 0</span></tt> is the first HAT of the joystick.</li> </ul> <p>Return a two-part tuple in the form <tt class="docutils literal"><span class= "pre">(x,</span> <span class="pre">y)</span></tt>. <tt class="docutils literal" ><span class="pre">x</span></tt> can be <tt class="docutils literal"><span class ="pre">-1</span></tt> (left), <tt class="docutils literal"><span class="pre">0</span></tt> (horizontal ly centered), or <tt class="docutils literal"><span class="pre">1</span></tt> (r ight). <tt class="docutils literal"><span class="pre">y</span></tt> can be <tt class="docutils literal"><span class="pre">-1</span></tt> (up), <tt class ="docutils literal"><span class="pre">0</span></tt> (vertically centered), or <t t class="docutils literal"><span class="pre">1</span></tt> (down). Return <tt class="docutils literal"><span class="pre">(0,</span> <span class="pr e">0)</span></tt> if the requested joystick or axis does not exist.</p> </dd></dl> <dl class="function"> <dt id="sge.get_joystick_button_pressed"> <tt class="descclassname">sge.</tt><tt class="descname">get_joystick_button_pres sed</tt><big>(</big><em>joystick</em>, <em>button</em><big>)</big><a class="head

erlink" href="#sge.get_joystick_button_pressed" title="Permalink to this definit ion"></a></dt> <dd><p>Return whether or not a joystick button is pressed.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">joystick</span></tt> &#8211; The number of the joystick to check, where <tt class="docutils literal"><span cl ass="pre">0</span></tt> is the first joystick, or the name of the joystick to check.</li> <li><tt class="docutils literal"><span class="pre">button</span></tt> &#8211; Th e number of the button to check, where <tt class="docutils literal"><span class= "pre">0</span></tt> is the first button of the joystick.</li> </ul> <p><tt class="docutils literal"><span class="pre">joystick</span></tt> is the nu mber of the joystick to check, where <tt class="docutils literal"><span class="p re">0</span></tt> is the first joystick. <tt class="docutils literal"><span class="pre">button</span ></tt> is the number of the button to check, where <tt class="docutils literal"><span class="pre">0</span></tt> is the first button of the joystick.</p> <p>Return <tt class="xref py py-const docutils literal"><span class="pre">False< /span></tt> if the requested joystick or button does not exist.</p> </dd></dl> <dl class="function"> <dt id="sge.get_joysticks"> <tt class="descclassname">sge.</tt><tt class="descname">get_joysticks</tt><big>( </big><big>)</big><a class="headerlink" href="#sge.get_joysticks" title="Permali nk to this definition"></a></dt> <dd><p>Return the number of joysticks available.</p> </dd></dl> <dl class="function"> <dt id="sge.get_joystick_name"> <tt class="descclassname">sge.</tt><tt class="descname">get_joystick_name</tt><b ig>(</big><em>joystick</em><big>)</big><a class="headerlink" href="#sge.get_joys tick_name" title="Permalink to this definition"></a></dt> <dd><p>Return the name of a joystick.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">joystick</span></tt> &#8211; The number of the joystick to check, where <tt class="docutils literal"><span cl ass="pre">0</span></tt> is the first joystick, or the name of the joystick to check.</li> </ul> <p>Return <tt class="xref py py-const docutils literal"><span class="pre">None</ span></tt> if the requested joystick does not exist.</p> </dd></dl> <dl class="function"> <dt id="sge.get_joystick_id"> <tt class="descclassname">sge.</tt><tt class="descname">get_joystick_id</tt><big >(</big><em>joystick</em><big>)</big><a class="headerlink" href="#sge.get_joysti ck_id" title="Permalink to this definition"></a></dt> <dd><p>Return the number of a joystick, where <tt class="docutils literal"><span class="pre">0</span></tt> is the first joystick.</p> <p>Arguments:</p> <ul class="simple">

<li><tt class="docutils literal"><span class="pre">joystick</span></tt> &#8211; The number of the joystick to check, where <tt class="docutils literal"><span cl ass="pre">0</span></tt> is the first joystick, or the name of the joystick to check.</li> </ul> <p>Return <tt class="xref py py-const docutils literal"><span class="pre">None</ span></tt> if the requested joystick does not exist.</p> </dd></dl> <dl class="function"> <dt id="sge.get_joystick_axes"> <tt class="descclassname">sge.</tt><tt class="descname">get_joystick_axes</tt><b ig>(</big><em>joystick</em><big>)</big><a class="headerlink" href="#sge.get_joys tick_axes" title="Permalink to this definition"></a></dt> <dd><p>Return the number of axes available on a joystick.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">joystick</span></tt> &#8211; The number of the joystick to check, where <tt class="docutils literal"><span cl ass="pre">0</span></tt> is the first joystick, or the name of the joystick to check.</li> </ul> <p>Return <tt class="docutils literal"><span class="pre">0</span></tt> if the re quested joystick does not exist.</p> </dd></dl> <dl class="function"> <dt id="sge.get_joystick_hats"> <tt class="descclassname">sge.</tt><tt class="descname">get_joystick_hats</tt><b ig>(</big><em>joystick</em><big>)</big><a class="headerlink" href="#sge.get_joys tick_hats" title="Permalink to this definition"></a></dt> <dd><p>Return the number of HATs available on a joystick.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">joystick</span></tt> &#8211; The number of the joystick to check, where <tt class="docutils literal"><span cl ass="pre">0</span></tt> is the first joystick, or the name of the joystick to check.</li> </ul> <p>Return <tt class="docutils literal"><span class="pre">0</span></tt> if the re quested joystick does not exist.</p> </dd></dl> <dl class="function"> <dt id="sge.get_joystick_trackballs"> <tt class="descclassname">sge.</tt><tt class="descname">get_joystick_trackballs< /tt><big>(</big><em>joystick</em><big>)</big><a class="headerlink" href="#sge.ge t_joystick_trackballs" title="Permalink to this definition"></a></dt> <dd><p>Return the number of trackballs available on a joystick.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">joystick</span></tt> &#8211; The number of the joystick to check, where <tt class="docutils literal"><span cl ass="pre">0</span></tt> is the first joystick, or the name of the joystick to check.</li> </ul> <p>Return <tt class="docutils literal"><span class="pre">0</span></tt> if the re quested joystick does not exist.</p> </dd></dl>

<dl class="function"> <dt id="sge.get_joystick_buttons"> <tt class="descclassname">sge.</tt><tt class="descname">get_joystick_buttons</tt ><big>(</big><em>joystick</em><big>)</big><a class="headerlink" href="#sge.get_j oystick_buttons" title="Permalink to this definition"></a></dt> <dd><p>Return the number of buttons available on a joystick.</p> <p>Arguments:</p> <ul class="simple"> <li><tt class="docutils literal"><span class="pre">joystick</span></tt> &#8211; The number of the joystick to check, where <tt class="docutils literal"><span cl ass="pre">0</span></tt> is the first joystick, or the name of the joystick to check.</li> </ul> <p>Return <tt class="docutils literal"><span class="pre">0</span></tt> if the re quested joystick does not exist.</p> </dd></dl> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="index.html"> <img class="logo" src="_static/sge_logo_alpha_black.png" alt="Logo "/> </a></p> <h4>Previous topic</h4> <p class="topless"><a href="View.html" title="previous chapter">sge.View</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/functions.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li>

<li class="right" > <a href="View.html" title="sge.View" >previous</a> |</li> <li><a href="index.html">The Pygame SGE 0.8.0 documentation</a> &raquo;< /li> </ul> </div> <div class="footer"> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>

Você também pode gostar