<!-- clanlib header begin --> <HTML> <HEAD> <TITLE>CL_InputButton - ClanLib Game SDK</TITLE> <STYLE TYPE="text/css"><!-- HTML BODY { font-family: verdana, helvetica, sans-serif; font-size: 12px; } H1 { font-size: 22px; } H2 { font-size: 18px; } H3 { font-size: 16px; } H4 { font-size: 14px; } P { font-size: 12px; } LI { font-size: 12px; } --></STYLE> </HEAD> <body bgcolor=white text=black link=blue vlink=#800080> <center> <img src="http://clanlib.org/gfx/clanlib.png"> </center> <!-- clanlib header end --> <center> <p> <a href="http://clanlib.org/docs.html">Home</a> | <a href="classes.html">All Classes</a> | <a href="modules.html">Grouped Classes</a> | <a href="index.html">Index</a> | <a href="search.html">Search</a> </p> </center> <h1>Class CL_InputButton</h1> <p> Input Button interface. <a href="#description">More...</a></p> <p>Derived from: <i>none</i> <br> Derived by: <i>none</i> <br>Group: Display (Input)</p> <p> #include <ClanLib/display.h> <p> <table border=0 width=100%> </table> <p><b>Construction:</b></p> <table border=0 width=100%> <tr><td width=30% valign=top><p><a href="CL_InputButton__CL_InputButton.html">CL_InputButton</a></p></td><td valign=top><p> Constructor.</p></td></tr></table> <p><b>Attributes:</b></p> <table border=0 width=100%> <tr><td width=30% valign=top><p><a href="CL_InputButton__peek_pressed.html">peek_pressed</a></p></td><td valign=top><p> Returns the number of presses this inputbutton has been pressed.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_InputButton__peek_key.html">peek_key</a></p></td><td valign=top><p> Returns the CL_InputEvent of the last input press.</p></td></tr></table> <p><b>Operations:</b></p> <table border=0 width=100%> <tr><td width=30% valign=top><p><a href="CL_InputButton__operator =.html">operator =</a></p></td><td valign=top><p> Copy assignment operator.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_InputButton__bind.html">bind</a></p></td><td valign=top><p> Binds a key.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_InputButton__unbind.html">unbind</a></p></td><td valign=top><p> Unbinds a key.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_InputButton__unbind_all.html">unbind_all</a></p></td><td valign=top><p> Unbinds all keys.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_InputButton__get_bindings.html">get_bindings</a></p></td><td valign=top><p> Returns a list over all keys bound to this inputbutton.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_InputButton__pop_pressed.html">pop_pressed</a></p></td><td valign=top><p> Returns the number of presses this inputbutton has been pressed. This clears the state of this inputbutton.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_InputButton__pop_key.html">pop_key</a></p></td><td valign=top><p> Returns the CL_InputEvent of the last input press. This clears the state of the inputbutton.</p></td></tr><tr><td width=30% valign=top><p><a href="CL_InputButton__clear.html">clear</a></p></td><td valign=top><p> Clears the state of the inputbutton.</p></td></tr></table> <a name="#description"><p><b>Detailed description:</b></p> !group=Display/Input! !header=display.h! Use this class to bind inputevents to this class. You can then check if any input events has be activated (like a mouse-press, a certain keypress etc). Useful for things like mapping SPACE and LEFT MOUSE to a Fire Action. <!-- clanlib footer begin --> <center><br><br><font color="#a0a0a0"> Questions or comments, write to the <a href="http://clanlib.org/contact.html">ClanLib mailing list</a>. </font></center> </body> </html> <!-- clanlib footer end -->