mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
1143 lines
46 KiB
HTML
1143 lines
46 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_101) on Sat Jun 10 08:04:06 CEST 2017 -->
|
|
<title>Input (libgdx API)</title>
|
|
<meta name="date" content="2017-06-10">
|
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="Input (libgdx API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6,"i26":6,"i27":6,"i28":6,"i29":6,"i30":6,"i31":6,"i32":6,"i33":6,"i34":6,"i35":6,"i36":6,"i37":6,"i38":6,"i39":6,"i40":6,"i41":6};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Input.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">
|
|
libgdx API
|
|
<style>
|
|
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
|
|
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
|
|
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
|
|
.TableHeadingColor { background:#EEEEFF; }
|
|
a { text-decoration:none }
|
|
a:hover { text-decoration:underline }
|
|
a:link, a:visited { color:blue }
|
|
table { border:0px }
|
|
.TableRowColor td:first-child { border-left:1px solid black }
|
|
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
|
|
hr { border:0px; border-bottom:1px solid #333366; }
|
|
</style>
|
|
</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../com/badlogic/gdx/Graphics.Monitor.html" title="class in com.badlogic.gdx"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../com/badlogic/gdx/Input.Buttons.html" title="class in com.badlogic.gdx"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?com/badlogic/gdx/Input.html" target="_top">Frames</a></li>
|
|
<li><a href="Input.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.badlogic.gdx</div>
|
|
<h2 title="Interface Input" class="title">Interface Input</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Known Implementing Classes:</dt>
|
|
<dd><a href="../../../com/badlogic/gdx/input/RemoteInput.html" title="class in com.badlogic.gdx.input">RemoteInput</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public interface <span class="typeNameLabel">Input</span></pre>
|
|
<div class="block"><p>
|
|
Interface to the input facilities. This allows polling the state of the keyboard, the touch screen and the accelerometer. On
|
|
some backends (desktop, gwt, etc) the touch screen is replaced by mouse input. The accelerometer is of course not available on
|
|
all backends.
|
|
</p>
|
|
|
|
<p>
|
|
Instead of polling for events, one can process all input events with an <a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><code>InputProcessor</code></a>. You can set the InputProcessor
|
|
via the <a href="../../../com/badlogic/gdx/Input.html#setInputProcessor-com.badlogic.gdx.InputProcessor-"><code>setInputProcessor(InputProcessor)</code></a> method. It will be called before the <a href="../../../com/badlogic/gdx/ApplicationListener.html#render--"><code>ApplicationListener.render()</code></a>
|
|
method in each frame.
|
|
</p>
|
|
|
|
<p>
|
|
Keyboard keys are translated to the constants in <a href="../../../com/badlogic/gdx/Input.Keys.html" title="class in com.badlogic.gdx"><code>Input.Keys</code></a> transparently on all systems. Do not use system specific key
|
|
constants.
|
|
</p>
|
|
|
|
<p>
|
|
The class also offers methods to use (and test for the presence of) other input systems like vibration, compass, on-screen
|
|
keyboards, and cursor capture. Support for simple input dialogs is also provided.
|
|
</p></div>
|
|
<dl>
|
|
<dt><span class="simpleTagLabel">Author:</span></dt>
|
|
<dd>mzechner</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="nested.class.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested Class Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
|
|
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Interface and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.Buttons.html" title="class in com.badlogic.gdx">Input.Buttons</a></span></code>
|
|
<div class="block">Mouse buttons.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.Keys.html" title="class in com.badlogic.gdx">Input.Keys</a></span></code>
|
|
<div class="block">Keys.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.Orientation.html" title="enum in com.badlogic.gdx">Input.Orientation</a></span></code> </td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx">Input.Peripheral</a></span></code>
|
|
<div class="block">Enumeration of potentially available peripherals.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static interface </code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</a></span></code>
|
|
<div class="block">Callback interface for <a href="../../../com/badlogic/gdx/Input.html#getTextInput-com.badlogic.gdx.Input.TextInputListener-java.lang.String-java.lang.String-java.lang.String-"><code>getTextInput(TextInputListener, String, String, String)</code></a></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#cancelVibrate--">cancelVibrate</a></span>()</code>
|
|
<div class="block">Stops the vibrator</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getAccelerometerX--">getAccelerometerX</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getAccelerometerY--">getAccelerometerY</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getAccelerometerZ--">getAccelerometerZ</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getAzimuth--">getAzimuth</a></span>()</code>
|
|
<div class="block">The azimuth is the angle of the device's orientation around the z-axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getCurrentEventTime--">getCurrentEventTime</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getDeltaX--">getDeltaX</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getDeltaX-int-">getDeltaX</a></span>(int pointer)</code> </td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getDeltaY--">getDeltaY</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getDeltaY-int-">getDeltaY</a></span>(int pointer)</code> </td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getGyroscopeX--">getGyroscopeX</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getGyroscopeY--">getGyroscopeY</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getGyroscopeZ--">getGyroscopeZ</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getInputProcessor--">getInputProcessor</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/badlogic/gdx/Input.Orientation.html" title="enum in com.badlogic.gdx">Input.Orientation</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getNativeOrientation--">getNativeOrientation</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getPitch--">getPitch</a></span>()</code>
|
|
<div class="block">The pitch is the angle of the device's orientation around the x-axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getRoll--">getRoll</a></span>()</code>
|
|
<div class="block">The roll is the angle of the device's orientation around the y-axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getRotation--">getRotation</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getRotationMatrix-float:A-">getRotationMatrix</a></span>(float[] matrix)</code>
|
|
<div class="block">Returns the rotation matrix describing the devices rotation as per <a href=
|
|
"http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])"
|
|
>SensorManager#getRotationMatrix(float[], float[], float[], float[])</a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getTextInput-com.badlogic.gdx.Input.TextInputListener-java.lang.String-java.lang.String-java.lang.String-">getTextInput</a></span>(<a href="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</a> listener,
|
|
java.lang.String title,
|
|
java.lang.String text,
|
|
java.lang.String hint)</code>
|
|
<div class="block">System dependent method to input a string of text.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getX--">getX</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getX-int-">getX</a></span>(int pointer)</code>
|
|
<div class="block">Returns the x coordinate in screen coordinates of the given pointer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getY--">getY</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#getY-int-">getY</a></span>(int pointer)</code>
|
|
<div class="block">Returns the y coordinate in screen coordinates of the given pointer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#isButtonPressed-int-">isButtonPressed</a></span>(int button)</code>
|
|
<div class="block">Whether a given button is pressed or not.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#isCatchBackKey--">isCatchBackKey</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#isCatchMenuKey--">isCatchMenuKey</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#isCursorCatched--">isCursorCatched</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#isKeyJustPressed-int-">isKeyJustPressed</a></span>(int key)</code>
|
|
<div class="block">Returns whether the key has just been pressed.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#isKeyPressed-int-">isKeyPressed</a></span>(int key)</code>
|
|
<div class="block">Returns whether the key is pressed.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#isPeripheralAvailable-com.badlogic.gdx.Input.Peripheral-">isPeripheralAvailable</a></span>(<a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx">Input.Peripheral</a> peripheral)</code>
|
|
<div class="block">Queries whether a <a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx"><code>Input.Peripheral</code></a> is currently available.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#isTouched--">isTouched</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i32" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#isTouched-int-">isTouched</a></span>(int pointer)</code>
|
|
<div class="block">Whether the screen is currently touched by the pointer with the given index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i33" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#justTouched--">justTouched</a></span>()</code> </td>
|
|
</tr>
|
|
<tr id="i34" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#setCatchBackKey-boolean-">setCatchBackKey</a></span>(boolean catchBack)</code>
|
|
<div class="block">Sets whether the BACK button on Android should be caught.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i35" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#setCatchMenuKey-boolean-">setCatchMenuKey</a></span>(boolean catchMenu)</code>
|
|
<div class="block">Sets whether the MENU button on Android should be caught.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i36" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#setCursorCatched-boolean-">setCursorCatched</a></span>(boolean catched)</code>
|
|
<div class="block">Only viable on the desktop.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i37" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#setCursorPosition-int-int-">setCursorPosition</a></span>(int x,
|
|
int y)</code>
|
|
<div class="block">Only viable on the desktop.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i38" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#setInputProcessor-com.badlogic.gdx.InputProcessor-">setInputProcessor</a></span>(<a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</a> processor)</code>
|
|
<div class="block">Sets the <a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><code>InputProcessor</code></a> that will receive all touch and key input events.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i39" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#setOnscreenKeyboardVisible-boolean-">setOnscreenKeyboardVisible</a></span>(boolean visible)</code>
|
|
<div class="block">Sets the on-screen keyboard visible if available.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i40" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#vibrate-int-">vibrate</a></span>(int milliseconds)</code>
|
|
<div class="block">Vibrates for the given amount of time.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i41" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/badlogic/gdx/Input.html#vibrate-long:A-int-">vibrate</a></span>(long[] pattern,
|
|
int repeat)</code>
|
|
<div class="block">Vibrate with a given pattern.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="getAccelerometerX--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAccelerometerX</h4>
|
|
<pre>float getAccelerometerX()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The acceleration force in m/s^2 applied to the device in the X axis, including the force of gravity</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAccelerometerY--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAccelerometerY</h4>
|
|
<pre>float getAccelerometerY()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The acceleration force in m/s^2 applied to the device in the Y axis, including the force of gravity</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getAccelerometerZ--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAccelerometerZ</h4>
|
|
<pre>float getAccelerometerZ()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The acceleration force in m/s^2 applied to the device in the Z axis, including the force of gravity</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getGyroscopeX--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getGyroscopeX</h4>
|
|
<pre>float getGyroscopeX()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The rate of rotation in rad/s around the X axis</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getGyroscopeY--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getGyroscopeY</h4>
|
|
<pre>float getGyroscopeY()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The rate of rotation in rad/s around the Y axis</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getGyroscopeZ--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getGyroscopeZ</h4>
|
|
<pre>float getGyroscopeZ()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The rate of rotation in rad/s around the Z axis</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getX--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getX</h4>
|
|
<pre>int getX()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The x coordinate of the last touch on touch screen devices and the current mouse position on desktop for the first
|
|
pointer in screen coordinates. The screen origin is the top left corner.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getX-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getX</h4>
|
|
<pre>int getX(int pointer)</pre>
|
|
<div class="block">Returns the x coordinate in screen coordinates of the given pointer. Pointers are indexed from 0 to n. The pointer id
|
|
identifies the order in which the fingers went down on the screen, e.g. 0 is the first finger, 1 is the second and so on.
|
|
When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on
|
|
the touch screen the first free index will be used.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pointer</code> - the pointer id.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the x coordinate</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getDeltaX--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDeltaX</h4>
|
|
<pre>int getDeltaX()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the different between the current pointer location and the last pointer location on the x-axis.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getDeltaX-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDeltaX</h4>
|
|
<pre>int getDeltaX(int pointer)</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the different between the current pointer location and the last pointer location on the x-axis.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getY--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getY</h4>
|
|
<pre>int getY()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The y coordinate of the last touch on touch screen devices and the current mouse position on desktop for the first
|
|
pointer in screen coordinates. The screen origin is the top left corner.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getY-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getY</h4>
|
|
<pre>int getY(int pointer)</pre>
|
|
<div class="block">Returns the y coordinate in screen coordinates of the given pointer. Pointers are indexed from 0 to n. The pointer id
|
|
identifies the order in which the fingers went down on the screen, e.g. 0 is the first finger, 1 is the second and so on.
|
|
When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on
|
|
the touch screen the first free index will be used.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pointer</code> - the pointer id.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the y coordinate</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getDeltaY--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDeltaY</h4>
|
|
<pre>int getDeltaY()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the different between the current pointer location and the last pointer location on the y-axis.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getDeltaY-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDeltaY</h4>
|
|
<pre>int getDeltaY(int pointer)</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the different between the current pointer location and the last pointer location on the y-axis.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isTouched--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isTouched</h4>
|
|
<pre>boolean isTouched()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether the screen is currently touched.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="justTouched--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>justTouched</h4>
|
|
<pre>boolean justTouched()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether a new touch down event just occurred.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isTouched-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isTouched</h4>
|
|
<pre>boolean isTouched(int pointer)</pre>
|
|
<div class="block">Whether the screen is currently touched by the pointer with the given index. Pointers are indexed from 0 to n. The pointer
|
|
id identifies the order in which the fingers went down on the screen, e.g. 0 is the first finger, 1 is the second and so on.
|
|
When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on
|
|
the touch screen the first free index will be used.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pointer</code> - the pointer</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether the screen is touched by the pointer</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isButtonPressed-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isButtonPressed</h4>
|
|
<pre>boolean isButtonPressed(int button)</pre>
|
|
<div class="block">Whether a given button is pressed or not. Button constants can be found in <a href="../../../com/badlogic/gdx/Input.Buttons.html" title="class in com.badlogic.gdx"><code>Input.Buttons</code></a>. On Android only the Button#LEFT
|
|
constant is meaningful before version 4.0.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>button</code> - the button to check.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether the button is down or not.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isKeyPressed-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isKeyPressed</h4>
|
|
<pre>boolean isKeyPressed(int key)</pre>
|
|
<div class="block">Returns whether the key is pressed.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>key</code> - The key code as found in <a href="../../../com/badlogic/gdx/Input.Keys.html" title="class in com.badlogic.gdx"><code>Input.Keys</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true or false.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isKeyJustPressed-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isKeyJustPressed</h4>
|
|
<pre>boolean isKeyJustPressed(int key)</pre>
|
|
<div class="block">Returns whether the key has just been pressed.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>key</code> - The key code as found in <a href="../../../com/badlogic/gdx/Input.Keys.html" title="class in com.badlogic.gdx"><code>Input.Keys</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true or false.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getTextInput-com.badlogic.gdx.Input.TextInputListener-java.lang.String-java.lang.String-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getTextInput</h4>
|
|
<pre>void getTextInput(<a href="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</a> listener,
|
|
java.lang.String title,
|
|
java.lang.String text,
|
|
java.lang.String hint)</pre>
|
|
<div class="block">System dependent method to input a string of text. A dialog box will be created with the given title and the given text as a
|
|
message for the user. Once the dialog has been closed the provided <a href="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx"><code>Input.TextInputListener</code></a> will be called on the rendering
|
|
thread.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>listener</code> - The TextInputListener.</dd>
|
|
<dd><code>title</code> - The title of the text input dialog.</dd>
|
|
<dd><code>text</code> - The message presented to the user.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setOnscreenKeyboardVisible-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setOnscreenKeyboardVisible</h4>
|
|
<pre>void setOnscreenKeyboardVisible(boolean visible)</pre>
|
|
<div class="block">Sets the on-screen keyboard visible if available.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>visible</code> - visible or not</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="vibrate-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>vibrate</h4>
|
|
<pre>void vibrate(int milliseconds)</pre>
|
|
<div class="block">Vibrates for the given amount of time. Note that you'll need the permission
|
|
<code> <uses-permission android:name="android.permission.VIBRATE" /></code> in your manifest file in order for this to work.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>milliseconds</code> - the number of milliseconds to vibrate.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="vibrate-long:A-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>vibrate</h4>
|
|
<pre>void vibrate(long[] pattern,
|
|
int repeat)</pre>
|
|
<div class="block">Vibrate with a given pattern. Pass in an array of ints that are the times at which to turn on or off the vibrator. The first
|
|
one is how long to wait before turning it on, and then after that it alternates. If you want to repeat, pass the index into
|
|
the pattern at which to start the repeat.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pattern</code> - an array of longs of times to turn the vibrator on or off.</dd>
|
|
<dd><code>repeat</code> - the index into pattern at which to repeat, or -1 if you don't want to repeat.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="cancelVibrate--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>cancelVibrate</h4>
|
|
<pre>void cancelVibrate()</pre>
|
|
<div class="block">Stops the vibrator</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getAzimuth--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAzimuth</h4>
|
|
<pre>float getAzimuth()</pre>
|
|
<div class="block">The azimuth is the angle of the device's orientation around the z-axis. The positive z-axis points towards the earths
|
|
center.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the azimuth in degrees</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a
|
|
href="http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])">http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getPitch--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPitch</h4>
|
|
<pre>float getPitch()</pre>
|
|
<div class="block">The pitch is the angle of the device's orientation around the x-axis. The positive x-axis roughly points to the west and is
|
|
orthogonal to the z- and y-axis.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the pitch in degrees</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a
|
|
href="http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])">http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getRoll--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getRoll</h4>
|
|
<pre>float getRoll()</pre>
|
|
<div class="block">The roll is the angle of the device's orientation around the y-axis. The positive y-axis points to the magnetic north pole
|
|
of the earth.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the roll in degrees</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a
|
|
href="http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])">http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getRotationMatrix-float:A-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getRotationMatrix</h4>
|
|
<pre>void getRotationMatrix(float[] matrix)</pre>
|
|
<div class="block">Returns the rotation matrix describing the devices rotation as per <a href=
|
|
"http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix(float[], float[], float[], float[])"
|
|
>SensorManager#getRotationMatrix(float[], float[], float[], float[])</a>. Does not manipulate the matrix if the platform
|
|
does not have an accelerometer.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>matrix</code> - </dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getCurrentEventTime--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCurrentEventTime</h4>
|
|
<pre>long getCurrentEventTime()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the time of the event currently reported to the <a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><code>InputProcessor</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setCatchBackKey-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setCatchBackKey</h4>
|
|
<pre>void setCatchBackKey(boolean catchBack)</pre>
|
|
<div class="block">Sets whether the BACK button on Android should be caught. This will prevent the app from being paused. Will have no effect
|
|
on the desktop.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>catchBack</code> - whether to catch the back button</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isCatchBackKey--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isCatchBackKey</h4>
|
|
<pre>boolean isCatchBackKey()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether the back button is currently being caught</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setCatchMenuKey-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setCatchMenuKey</h4>
|
|
<pre>void setCatchMenuKey(boolean catchMenu)</pre>
|
|
<div class="block">Sets whether the MENU button on Android should be caught. This will prevent the onscreen keyboard to show up. Will have no
|
|
effect on the desktop.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>catchMenu</code> - whether to catch the menu button</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isCatchMenuKey--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isCatchMenuKey</h4>
|
|
<pre>boolean isCatchMenuKey()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether the menu button is currently being caught</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setInputProcessor-com.badlogic.gdx.InputProcessor-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setInputProcessor</h4>
|
|
<pre>void setInputProcessor(<a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</a> processor)</pre>
|
|
<div class="block">Sets the <a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><code>InputProcessor</code></a> that will receive all touch and key input events. It will be called before the
|
|
<a href="../../../com/badlogic/gdx/ApplicationListener.html#render--"><code>ApplicationListener.render()</code></a> method each frame.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>processor</code> - the InputProcessor</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getInputProcessor--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getInputProcessor</h4>
|
|
<pre><a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</a> getInputProcessor()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the currently set <a href="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><code>InputProcessor</code></a> or null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isPeripheralAvailable-com.badlogic.gdx.Input.Peripheral-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isPeripheralAvailable</h4>
|
|
<pre>boolean isPeripheralAvailable(<a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx">Input.Peripheral</a> peripheral)</pre>
|
|
<div class="block">Queries whether a <a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx"><code>Input.Peripheral</code></a> is currently available. In case of Android and the <a href="../../../com/badlogic/gdx/Input.Peripheral.html#HardwareKeyboard"><code>Input.Peripheral.HardwareKeyboard</code></a>
|
|
this returns the whether the keyboard is currently slid out or not.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>peripheral</code> - the <a href="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx"><code>Input.Peripheral</code></a></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether the peripheral is available or not.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getRotation--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getRotation</h4>
|
|
<pre>int getRotation()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the rotation of the device with respect to its native orientation.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getNativeOrientation--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getNativeOrientation</h4>
|
|
<pre><a href="../../../com/badlogic/gdx/Input.Orientation.html" title="enum in com.badlogic.gdx">Input.Orientation</a> getNativeOrientation()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the native orientation of the device.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setCursorCatched-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setCursorCatched</h4>
|
|
<pre>void setCursorCatched(boolean catched)</pre>
|
|
<div class="block">Only viable on the desktop. Will confine the mouse cursor location to the window and hide the mouse cursor. X and y
|
|
coordinates are still reported as if the mouse was not catched.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>catched</code> - whether to catch or not to catch the mouse cursor</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isCursorCatched--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isCursorCatched</h4>
|
|
<pre>boolean isCursorCatched()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether the mouse cursor is catched.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setCursorPosition-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>setCursorPosition</h4>
|
|
<pre>void setCursorPosition(int x,
|
|
int y)</pre>
|
|
<div class="block">Only viable on the desktop. Will set the mouse cursor location to the given window coordinates (origin top-left corner).</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - the x-position</dd>
|
|
<dd><code>y</code> - the y-position</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Input.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">libgdx API</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../com/badlogic/gdx/Graphics.Monitor.html" title="class in com.badlogic.gdx"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../com/badlogic/gdx/Input.Buttons.html" title="class in com.badlogic.gdx"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?com/badlogic/gdx/Input.html" target="_top">Frames</a></li>
|
|
<li><a href="Input.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small>
|
|
<div style="font-size:9pt"><i>
|
|
Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
|
|
</i></div>
|
|
</small></p>
|
|
</body>
|
|
</html>
|