
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1659 4e206d99-4929-0410-ac5d-dfc041789085
33 lines
1,007 B
HTML
33 lines
1,007 B
HTML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html>
|
|
<head>
|
|
<title>isKeyDown (SFML::Input)</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
</head>
|
|
<body class="standalone-code">
|
|
<pre>/* call-seq:
|
|
* input.isKeyDown( keycode ) -> true or false
|
|
*
|
|
* Get the current state of a key (pressed or released).
|
|
*/
|
|
static VALUE Input_IsKeyDown( VALUE self, VALUE aKeyCode )
|
|
{
|
|
sf::Input *object = NULL;
|
|
Data_Get_Struct( self, sf::Input, object );
|
|
sf::Key::Code rawCode = static_cast< sf::Key::Code > ( NUM2INT( aKeyCode ) );
|
|
if( object->IsKeyDown( rawCode ) == true )
|
|
{
|
|
return Qtrue;
|
|
}
|
|
else
|
|
{
|
|
return Qfalse;
|
|
}
|
|
}</pre>
|
|
</body>
|
|
</html> |