Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
307 chris 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<!--NewPage-->
3
<HTML>
4
<HEAD>
5
<!-- Generated by javadoc (build 1.6.0_26) on Sun Jun 03 02:18:08 CEST 2012 -->
6
<TITLE>
7
Input (libgdx API)
8
</TITLE>
9
 
10
<META NAME="date" CONTENT="2012-06-03">
11
 
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
13
 
14
<SCRIPT type="text/javascript">
15
function windowTitle()
16
{
17
    if (location.href.indexOf('is-external=true') == -1) {
18
        parent.document.title="Input (libgdx API)";
19
    }
20
}
21
</SCRIPT>
22
<NOSCRIPT>
23
</NOSCRIPT>
24
 
25
</HEAD>
26
 
27
<BODY BGCOLOR="white" onload="windowTitle();">
28
<HR>
29
 
30
 
31
<!-- ========= START OF TOP NAVBAR ======= -->
32
<A NAME="navbar_top"><!-- --></A>
33
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35
<TR>
36
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37
<A NAME="navbar_top_firstrow"><!-- --></A>
38
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39
  <TR ALIGN="center" VALIGN="top">
40
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Input.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48
  </TR>
49
</TABLE>
50
</TD>
51
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52
 
53
                                libgdx API
54
                                <style>
55
                                body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
56
                                pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
57
                                h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%;  font-weight:bold }
58
                                .TableHeadingColor { background:#EEEEFF; }
59
                                a { text-decoration:none }
60
                                a:hover { text-decoration:underline }
61
                                a:link, a:visited { color:blue }
62
                                table { border:0px }
63
                                .TableRowColor td:first-child { border-left:1px solid black }
64
                                .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
65
                                hr { border:0px; border-bottom:1px solid #333366; }
66
                                </style>
67
                        </EM>
68
</TD>
69
</TR>
70
 
71
<TR>
72
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
73
&nbsp;<A HREF="../../../com/badlogic/gdx/Graphics.GraphicsType.html" title="enum in com.badlogic.gdx"><B>PREV CLASS</B></A>&nbsp;
74
&nbsp;<A HREF="../../../com/badlogic/gdx/Input.Buttons.html" title="class in com.badlogic.gdx"><B>NEXT CLASS</B></A></FONT></TD>
75
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
76
  <A HREF="../../../index.html?com/badlogic/gdx/Input.html" target="_top"><B>FRAMES</B></A>  &nbsp;
77
&nbsp;<A HREF="Input.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
78
&nbsp;<SCRIPT type="text/javascript">
79
  <!--
80
  if(window==top) {
81
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
82
  }
83
  //-->
84
</SCRIPT>
85
<NOSCRIPT>
86
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
87
</NOSCRIPT>
88
 
89
 
90
</FONT></TD>
91
</TR>
92
<TR>
93
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
94
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
95
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
96
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
97
</TR>
98
</TABLE>
99
<A NAME="skip-navbar_top"></A>
100
<!-- ========= END OF TOP NAVBAR ========= -->
101
 
102
<HR>
103
<!-- ======== START OF CLASS DATA ======== -->
104
<H2>
105
<FONT SIZE="-1">
106
com.badlogic.gdx</FONT>
107
<BR>
108
Interface Input</H2>
109
<DL>
110
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../com/badlogic/gdx/input/RemoteInput.html" title="class in com.badlogic.gdx.input">RemoteInput</A></DD>
111
</DL>
112
<HR>
113
<DL>
114
<DT><PRE>public interface <B>Input</B></DL>
115
</PRE>
116
 
117
<P>
118
<p>
119
 Interface to the input facilities. This allows to poll the state of the keyboard, touch screen and accelerometer. On the
120
 desktop the touch screen is replaced by mouse input, the accelerometer is of course not available.
121
 </p>
122
 
123
 <p>
124
 Additionally one can process events with an <A HREF="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><CODE>InputProcessor</CODE></A> with this module. You can set the InputProcessor via the
125
 <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
126
 each frame.
127
 </p>
128
 
129
 <p>
130
 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> transparantely on all systems. Do not use system specific key
131
 constants.
132
 </p>
133
 
134
 <p>
135
 The class also offers methods to let the phone vibrate as well as getting compass readings.
136
 </p>
137
<P>
138
 
139
<P>
140
<DL>
141
<DT><B>Author:</B></DT>
142
  <DD>mzechner</DD>
143
</DL>
144
<HR>
145
 
146
<P>
147
<!-- ======== NESTED CLASS SUMMARY ======== -->
148
 
149
<A NAME="nested_class_summary"><!-- --></A>
150
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
151
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
152
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
153
<B>Nested Class Summary</B></FONT></TH>
154
</TR>
155
<TR BGCOLOR="white" CLASS="TableRowColor">
156
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
157
<CODE>static&nbsp;class</CODE></FONT></TD>
158
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.Buttons.html" title="class in com.badlogic.gdx">Input.Buttons</A></B></CODE>
159
 
160
<BR>
161
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mouse buttons.</TD>
162
</TR>
163
<TR BGCOLOR="white" CLASS="TableRowColor">
164
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
165
<CODE>static&nbsp;class</CODE></FONT></TD>
166
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.Keys.html" title="class in com.badlogic.gdx">Input.Keys</A></B></CODE>
167
 
168
<BR>
169
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Keys.</TD>
170
</TR>
171
<TR BGCOLOR="white" CLASS="TableRowColor">
172
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
173
<CODE>static&nbsp;class</CODE></FONT></TD>
174
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.Orientation.html" title="enum in com.badlogic.gdx">Input.Orientation</A></B></CODE>
175
 
176
<BR>
177
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
178
</TR>
179
<TR BGCOLOR="white" CLASS="TableRowColor">
180
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
181
<CODE>static&nbsp;class</CODE></FONT></TD>
182
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx">Input.Peripheral</A></B></CODE>
183
 
184
<BR>
185
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enumeration of potentially available peripherals.</TD>
186
</TR>
187
<TR BGCOLOR="white" CLASS="TableRowColor">
188
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189
<CODE>static&nbsp;interface</CODE></FONT></TD>
190
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</A></B></CODE>
191
 
192
<BR>
193
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Callback interface for <A HREF="../../../com/badlogic/gdx/Input.html#getTextInput(com.badlogic.gdx.Input.TextInputListener, java.lang.String, java.lang.String)"><CODE>getTextInput(TextInputListener, String, String)</CODE></A></TD>
194
</TR>
195
</TABLE>
196
&nbsp;
197
<!-- ========== METHOD SUMMARY =========== -->
198
 
199
<A NAME="method_summary"><!-- --></A>
200
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
201
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
202
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
203
<B>Method Summary</B></FONT></TH>
204
</TR>
205
<TR BGCOLOR="white" CLASS="TableRowColor">
206
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
207
<CODE>&nbsp;void</CODE></FONT></TD>
208
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#cancelVibrate()">cancelVibrate</A></B>()</CODE>
209
 
210
<BR>
211
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stops the vibrator</TD>
212
</TR>
213
<TR BGCOLOR="white" CLASS="TableRowColor">
214
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
215
<CODE>&nbsp;float</CODE></FONT></TD>
216
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getAccelerometerX()">getAccelerometerX</A></B>()</CODE>
217
 
218
<BR>
219
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
220
</TR>
221
<TR BGCOLOR="white" CLASS="TableRowColor">
222
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
223
<CODE>&nbsp;float</CODE></FONT></TD>
224
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getAccelerometerY()">getAccelerometerY</A></B>()</CODE>
225
 
226
<BR>
227
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
228
</TR>
229
<TR BGCOLOR="white" CLASS="TableRowColor">
230
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
231
<CODE>&nbsp;float</CODE></FONT></TD>
232
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getAccelerometerZ()">getAccelerometerZ</A></B>()</CODE>
233
 
234
<BR>
235
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
236
</TR>
237
<TR BGCOLOR="white" CLASS="TableRowColor">
238
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
239
<CODE>&nbsp;float</CODE></FONT></TD>
240
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getAzimuth()">getAzimuth</A></B>()</CODE>
241
 
242
<BR>
243
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The azimuth is the angle of the device's orientation around the z-axis.</TD>
244
</TR>
245
<TR BGCOLOR="white" CLASS="TableRowColor">
246
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
247
<CODE>&nbsp;long</CODE></FONT></TD>
248
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getCurrentEventTime()">getCurrentEventTime</A></B>()</CODE>
249
 
250
<BR>
251
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
252
</TR>
253
<TR BGCOLOR="white" CLASS="TableRowColor">
254
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
255
<CODE>&nbsp;int</CODE></FONT></TD>
256
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getDeltaX()">getDeltaX</A></B>()</CODE>
257
 
258
<BR>
259
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
260
</TR>
261
<TR BGCOLOR="white" CLASS="TableRowColor">
262
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
263
<CODE>&nbsp;int</CODE></FONT></TD>
264
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getDeltaX(int)">getDeltaX</A></B>(int&nbsp;pointer)</CODE>
265
 
266
<BR>
267
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
268
</TR>
269
<TR BGCOLOR="white" CLASS="TableRowColor">
270
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
271
<CODE>&nbsp;int</CODE></FONT></TD>
272
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getDeltaY()">getDeltaY</A></B>()</CODE>
273
 
274
<BR>
275
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
276
</TR>
277
<TR BGCOLOR="white" CLASS="TableRowColor">
278
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
279
<CODE>&nbsp;int</CODE></FONT></TD>
280
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getDeltaY(int)">getDeltaY</A></B>(int&nbsp;pointer)</CODE>
281
 
282
<BR>
283
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
284
</TR>
285
<TR BGCOLOR="white" CLASS="TableRowColor">
286
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
287
<CODE>&nbsp;<A HREF="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</A></CODE></FONT></TD>
288
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getInputProcessor()">getInputProcessor</A></B>()</CODE>
289
 
290
<BR>
291
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
292
</TR>
293
<TR BGCOLOR="white" CLASS="TableRowColor">
294
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
295
<CODE>&nbsp;<A HREF="../../../com/badlogic/gdx/Input.Orientation.html" title="enum in com.badlogic.gdx">Input.Orientation</A></CODE></FONT></TD>
296
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getNativeOrientation()">getNativeOrientation</A></B>()</CODE>
297
 
298
<BR>
299
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
300
</TR>
301
<TR BGCOLOR="white" CLASS="TableRowColor">
302
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
303
<CODE>&nbsp;float</CODE></FONT></TD>
304
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getPitch()">getPitch</A></B>()</CODE>
305
 
306
<BR>
307
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The pitch is the angle of the device's orientation around the x-axis.</TD>
308
</TR>
309
<TR BGCOLOR="white" CLASS="TableRowColor">
310
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
311
<CODE>&nbsp;void</CODE></FONT></TD>
312
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getPlaceholderTextInput(com.badlogic.gdx.Input.TextInputListener, java.lang.String, java.lang.String)">getPlaceholderTextInput</A></B>(<A HREF="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</A>&nbsp;listener,
313
                        java.lang.String&nbsp;title,
314
                        java.lang.String&nbsp;placeholder)</CODE>
315
 
316
<BR>
317
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System dependent method to input a string of text.</TD>
318
</TR>
319
<TR BGCOLOR="white" CLASS="TableRowColor">
320
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
321
<CODE>&nbsp;float</CODE></FONT></TD>
322
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getRoll()">getRoll</A></B>()</CODE>
323
 
324
<BR>
325
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The roll is the angle of the device's orientation around the y-axis.</TD>
326
</TR>
327
<TR BGCOLOR="white" CLASS="TableRowColor">
328
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
329
<CODE>&nbsp;int</CODE></FONT></TD>
330
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getRotation()">getRotation</A></B>()</CODE>
331
 
332
<BR>
333
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
334
</TR>
335
<TR BGCOLOR="white" CLASS="TableRowColor">
336
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
337
<CODE>&nbsp;void</CODE></FONT></TD>
338
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getRotationMatrix(float[])">getRotationMatrix</A></B>(float[]&nbsp;matrix)</CODE>
339
 
340
<BR>
341
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>.</TD>
342
</TR>
343
<TR BGCOLOR="white" CLASS="TableRowColor">
344
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
345
<CODE>&nbsp;void</CODE></FONT></TD>
346
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getTextInput(com.badlogic.gdx.Input.TextInputListener, java.lang.String, java.lang.String)">getTextInput</A></B>(<A HREF="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</A>&nbsp;listener,
347
             java.lang.String&nbsp;title,
348
             java.lang.String&nbsp;text)</CODE>
349
 
350
<BR>
351
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System dependent method to input a string of text.</TD>
352
</TR>
353
<TR BGCOLOR="white" CLASS="TableRowColor">
354
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
355
<CODE>&nbsp;int</CODE></FONT></TD>
356
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getX()">getX</A></B>()</CODE>
357
 
358
<BR>
359
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
360
</TR>
361
<TR BGCOLOR="white" CLASS="TableRowColor">
362
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
363
<CODE>&nbsp;int</CODE></FONT></TD>
364
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getX(int)">getX</A></B>(int&nbsp;pointer)</CODE>
365
 
366
<BR>
367
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the x coordinate in screen coordinates of the given pointer.</TD>
368
</TR>
369
<TR BGCOLOR="white" CLASS="TableRowColor">
370
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
371
<CODE>&nbsp;int</CODE></FONT></TD>
372
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getY()">getY</A></B>()</CODE>
373
 
374
<BR>
375
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
376
</TR>
377
<TR BGCOLOR="white" CLASS="TableRowColor">
378
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
379
<CODE>&nbsp;int</CODE></FONT></TD>
380
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#getY(int)">getY</A></B>(int&nbsp;pointer)</CODE>
381
 
382
<BR>
383
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the y coordinate in screen coordinates of the given pointer.</TD>
384
</TR>
385
<TR BGCOLOR="white" CLASS="TableRowColor">
386
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
387
<CODE>&nbsp;boolean</CODE></FONT></TD>
388
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#isButtonPressed(int)">isButtonPressed</A></B>(int&nbsp;button)</CODE>
389
 
390
<BR>
391
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether a given button is pressed or not.</TD>
392
</TR>
393
<TR BGCOLOR="white" CLASS="TableRowColor">
394
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
395
<CODE>&nbsp;boolean</CODE></FONT></TD>
396
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#isCursorCatched()">isCursorCatched</A></B>()</CODE>
397
 
398
<BR>
399
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
400
</TR>
401
<TR BGCOLOR="white" CLASS="TableRowColor">
402
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
403
<CODE>&nbsp;boolean</CODE></FONT></TD>
404
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#isKeyPressed(int)">isKeyPressed</A></B>(int&nbsp;key)</CODE>
405
 
406
<BR>
407
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the key is pressed.</TD>
408
</TR>
409
<TR BGCOLOR="white" CLASS="TableRowColor">
410
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
411
<CODE>&nbsp;boolean</CODE></FONT></TD>
412
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#isPeripheralAvailable(com.badlogic.gdx.Input.Peripheral)">isPeripheralAvailable</A></B>(<A HREF="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx">Input.Peripheral</A>&nbsp;peripheral)</CODE>
413
 
414
<BR>
415
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
416
</TR>
417
<TR BGCOLOR="white" CLASS="TableRowColor">
418
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
419
<CODE>&nbsp;boolean</CODE></FONT></TD>
420
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#isTouched()">isTouched</A></B>()</CODE>
421
 
422
<BR>
423
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
424
</TR>
425
<TR BGCOLOR="white" CLASS="TableRowColor">
426
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
427
<CODE>&nbsp;boolean</CODE></FONT></TD>
428
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#isTouched(int)">isTouched</A></B>(int&nbsp;pointer)</CODE>
429
 
430
<BR>
431
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether the screen is currently touched by the pointer with the given index.</TD>
432
</TR>
433
<TR BGCOLOR="white" CLASS="TableRowColor">
434
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
435
<CODE>&nbsp;boolean</CODE></FONT></TD>
436
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#justTouched()">justTouched</A></B>()</CODE>
437
 
438
<BR>
439
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
440
</TR>
441
<TR BGCOLOR="white" CLASS="TableRowColor">
442
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
443
<CODE>&nbsp;void</CODE></FONT></TD>
444
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#setCatchBackKey(boolean)">setCatchBackKey</A></B>(boolean&nbsp;catchBack)</CODE>
445
 
446
<BR>
447
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether the BACK button on Android should be caught.</TD>
448
</TR>
449
<TR BGCOLOR="white" CLASS="TableRowColor">
450
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
451
<CODE>&nbsp;void</CODE></FONT></TD>
452
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#setCatchMenuKey(boolean)">setCatchMenuKey</A></B>(boolean&nbsp;catchMenu)</CODE>
453
 
454
<BR>
455
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether the MENU button on Android should be caught.</TD>
456
</TR>
457
<TR BGCOLOR="white" CLASS="TableRowColor">
458
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
459
<CODE>&nbsp;void</CODE></FONT></TD>
460
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#setCursorCatched(boolean)">setCursorCatched</A></B>(boolean&nbsp;catched)</CODE>
461
 
462
<BR>
463
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Only viable on the desktop.</TD>
464
</TR>
465
<TR BGCOLOR="white" CLASS="TableRowColor">
466
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
467
<CODE>&nbsp;void</CODE></FONT></TD>
468
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#setCursorPosition(int, int)">setCursorPosition</A></B>(int&nbsp;x,
469
                  int&nbsp;y)</CODE>
470
 
471
<BR>
472
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Only viable on the desktop.</TD>
473
</TR>
474
<TR BGCOLOR="white" CLASS="TableRowColor">
475
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
476
<CODE>&nbsp;void</CODE></FONT></TD>
477
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#setInputProcessor(com.badlogic.gdx.InputProcessor)">setInputProcessor</A></B>(<A HREF="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</A>&nbsp;processor)</CODE>
478
 
479
<BR>
480
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
481
</TR>
482
<TR BGCOLOR="white" CLASS="TableRowColor">
483
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
484
<CODE>&nbsp;void</CODE></FONT></TD>
485
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#setOnscreenKeyboardVisible(boolean)">setOnscreenKeyboardVisible</A></B>(boolean&nbsp;visible)</CODE>
486
 
487
<BR>
488
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the on-screen keyboard visible if available.</TD>
489
</TR>
490
<TR BGCOLOR="white" CLASS="TableRowColor">
491
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
492
<CODE>&nbsp;void</CODE></FONT></TD>
493
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#vibrate(int)">vibrate</A></B>(int&nbsp;milliseconds)</CODE>
494
 
495
<BR>
496
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vibrates for the given amount of time.</TD>
497
</TR>
498
<TR BGCOLOR="white" CLASS="TableRowColor">
499
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
500
<CODE>&nbsp;void</CODE></FONT></TD>
501
<TD><CODE><B><A HREF="../../../com/badlogic/gdx/Input.html#vibrate(long[], int)">vibrate</A></B>(long[]&nbsp;pattern,
502
        int&nbsp;repeat)</CODE>
503
 
504
<BR>
505
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vibrate with a given pattern.</TD>
506
</TR>
507
</TABLE>
508
&nbsp;
509
<P>
510
 
511
<!-- ============ METHOD DETAIL ========== -->
512
 
513
<A NAME="method_detail"><!-- --></A>
514
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
515
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
516
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
517
<B>Method Detail</B></FONT></TH>
518
</TR>
519
</TABLE>
520
 
521
<A NAME="getAccelerometerX()"><!-- --></A><H3>
522
getAccelerometerX</H3>
523
<PRE>
524
float <B>getAccelerometerX</B>()</PRE>
525
<DL>
526
<DD><DL>
527
 
528
<DT><B>Returns:</B><DD>The value of the accelerometer on its x-axis. ranges between [-10,10].</DL>
529
</DD>
530
</DL>
531
<HR>
532
 
533
<A NAME="getAccelerometerY()"><!-- --></A><H3>
534
getAccelerometerY</H3>
535
<PRE>
536
float <B>getAccelerometerY</B>()</PRE>
537
<DL>
538
<DD><DL>
539
 
540
<DT><B>Returns:</B><DD>The value of the accelerometer on its y-axis. ranges between [-10,10].</DL>
541
</DD>
542
</DL>
543
<HR>
544
 
545
<A NAME="getAccelerometerZ()"><!-- --></A><H3>
546
getAccelerometerZ</H3>
547
<PRE>
548
float <B>getAccelerometerZ</B>()</PRE>
549
<DL>
550
<DD><DL>
551
 
552
<DT><B>Returns:</B><DD>The value of the accelerometer on its y-axis. ranges between [-10,10].</DL>
553
</DD>
554
</DL>
555
<HR>
556
 
557
<A NAME="getX()"><!-- --></A><H3>
558
getX</H3>
559
<PRE>
560
int <B>getX</B>()</PRE>
561
<DL>
562
<DD><DL>
563
 
564
<DT><B>Returns:</B><DD>the last touch x coordinate in screen coordinates. The screen origin is the top left corner.</DL>
565
</DD>
566
</DL>
567
<HR>
568
 
569
<A NAME="getX(int)"><!-- --></A><H3>
570
getX</H3>
571
<PRE>
572
int <B>getX</B>(int&nbsp;pointer)</PRE>
573
<DL>
574
<DD>Returns the x coordinate in screen coordinates of the given pointer. Pointers are indexed from 0 to n. The pointer id
575
 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.
576
 When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on
577
 the touch screen the first free index will be used.
578
<P>
579
<DD><DL>
580
<DT><B>Parameters:</B><DD><CODE>pointer</CODE> - the pointer id.
581
<DT><B>Returns:</B><DD>the x coordinate</DL>
582
</DD>
583
</DL>
584
<HR>
585
 
586
<A NAME="getDeltaX()"><!-- --></A><H3>
587
getDeltaX</H3>
588
<PRE>
589
int <B>getDeltaX</B>()</PRE>
590
<DL>
591
<DD><DL>
592
 
593
<DT><B>Returns:</B><DD>the different between the current pointer location and the last pointer location on the x-axis.</DL>
594
</DD>
595
</DL>
596
<HR>
597
 
598
<A NAME="getDeltaX(int)"><!-- --></A><H3>
599
getDeltaX</H3>
600
<PRE>
601
int <B>getDeltaX</B>(int&nbsp;pointer)</PRE>
602
<DL>
603
<DD><DL>
604
 
605
<DT><B>Returns:</B><DD>the different between the current pointer location and the last pointer location on the x-axis.</DL>
606
</DD>
607
</DL>
608
<HR>
609
 
610
<A NAME="getY()"><!-- --></A><H3>
611
getY</H3>
612
<PRE>
613
int <B>getY</B>()</PRE>
614
<DL>
615
<DD><DL>
616
 
617
<DT><B>Returns:</B><DD>the last touch y coordinate in screen coordinates. The screen origin is the top left corner.</DL>
618
</DD>
619
</DL>
620
<HR>
621
 
622
<A NAME="getY(int)"><!-- --></A><H3>
623
getY</H3>
624
<PRE>
625
int <B>getY</B>(int&nbsp;pointer)</PRE>
626
<DL>
627
<DD>Returns the y coordinate in screen coordinates of the given pointer. Pointers are indexed from 0 to n. The pointer id
628
 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.
629
 When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on
630
 the touch screen the first free index will be used.
631
<P>
632
<DD><DL>
633
<DT><B>Parameters:</B><DD><CODE>pointer</CODE> - the pointer id.
634
<DT><B>Returns:</B><DD>the y coordinate</DL>
635
</DD>
636
</DL>
637
<HR>
638
 
639
<A NAME="getDeltaY()"><!-- --></A><H3>
640
getDeltaY</H3>
641
<PRE>
642
int <B>getDeltaY</B>()</PRE>
643
<DL>
644
<DD><DL>
645
 
646
<DT><B>Returns:</B><DD>the different between the current pointer location and the last pointer location on the y-axis.</DL>
647
</DD>
648
</DL>
649
<HR>
650
 
651
<A NAME="getDeltaY(int)"><!-- --></A><H3>
652
getDeltaY</H3>
653
<PRE>
654
int <B>getDeltaY</B>(int&nbsp;pointer)</PRE>
655
<DL>
656
<DD><DL>
657
 
658
<DT><B>Returns:</B><DD>the different between the current pointer location and the last pointer location on the y-axis.</DL>
659
</DD>
660
</DL>
661
<HR>
662
 
663
<A NAME="isTouched()"><!-- --></A><H3>
664
isTouched</H3>
665
<PRE>
666
boolean <B>isTouched</B>()</PRE>
667
<DL>
668
<DD><DL>
669
 
670
<DT><B>Returns:</B><DD>whether the screen is currently touched.</DL>
671
</DD>
672
</DL>
673
<HR>
674
 
675
<A NAME="justTouched()"><!-- --></A><H3>
676
justTouched</H3>
677
<PRE>
678
boolean <B>justTouched</B>()</PRE>
679
<DL>
680
<DD><DL>
681
 
682
<DT><B>Returns:</B><DD>whether a new touch down event just occured.</DL>
683
</DD>
684
</DL>
685
<HR>
686
 
687
<A NAME="isTouched(int)"><!-- --></A><H3>
688
isTouched</H3>
689
<PRE>
690
boolean <B>isTouched</B>(int&nbsp;pointer)</PRE>
691
<DL>
692
<DD>Whether the screen is currently touched by the pointer with the given index. Pointers are indexed from 0 to n. The pointer
693
 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.
694
 When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on
695
 the touch screen the first free index will be used.
696
<P>
697
<DD><DL>
698
<DT><B>Parameters:</B><DD><CODE>pointer</CODE> - the pointer
699
<DT><B>Returns:</B><DD>whether the screen is touched by the pointer</DL>
700
</DD>
701
</DL>
702
<HR>
703
 
704
<A NAME="isButtonPressed(int)"><!-- --></A><H3>
705
isButtonPressed</H3>
706
<PRE>
707
boolean <B>isButtonPressed</B>(int&nbsp;button)</PRE>
708
<DL>
709
<DD>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
710
 constant is meaningful.
711
<P>
712
<DD><DL>
713
<DT><B>Parameters:</B><DD><CODE>button</CODE> - the button to check.
714
<DT><B>Returns:</B><DD>whether the button is down or not.</DL>
715
</DD>
716
</DL>
717
<HR>
718
 
719
<A NAME="isKeyPressed(int)"><!-- --></A><H3>
720
isKeyPressed</H3>
721
<PRE>
722
boolean <B>isKeyPressed</B>(int&nbsp;key)</PRE>
723
<DL>
724
<DD>Returns whether the key is pressed.
725
<P>
726
<DD><DL>
727
<DT><B>Parameters:</B><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>.
728
<DT><B>Returns:</B><DD>true or false.</DL>
729
</DD>
730
</DL>
731
<HR>
732
 
733
<A NAME="getTextInput(com.badlogic.gdx.Input.TextInputListener, java.lang.String, java.lang.String)"><!-- --></A><H3>
734
getTextInput</H3>
735
<PRE>
736
void <B>getTextInput</B>(<A HREF="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</A>&nbsp;listener,
737
                  java.lang.String&nbsp;title,
738
                  java.lang.String&nbsp;text)</PRE>
739
<DL>
740
<DD>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
741
 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.
742
<P>
743
<DD><DL>
744
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - The TextInputListener.<DD><CODE>title</CODE> - The title of the text input dialog.<DD><CODE>text</CODE> - The message presented to the user.</DL>
745
</DD>
746
</DL>
747
<HR>
748
 
749
<A NAME="getPlaceholderTextInput(com.badlogic.gdx.Input.TextInputListener, java.lang.String, java.lang.String)"><!-- --></A><H3>
750
getPlaceholderTextInput</H3>
751
<PRE>
752
void <B>getPlaceholderTextInput</B>(<A HREF="../../../com/badlogic/gdx/Input.TextInputListener.html" title="interface in com.badlogic.gdx">Input.TextInputListener</A>&nbsp;listener,
753
                             java.lang.String&nbsp;title,
754
                             java.lang.String&nbsp;placeholder)</PRE>
755
<DL>
756
<DD>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
757
 hint 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
758
 rendering thread.
759
<P>
760
<DD><DL>
761
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - The TextInputListener.<DD><CODE>title</CODE> - The title of the text input dialog.<DD><CODE>text</CODE> - The placeholder text presented to the user.</DL>
762
</DD>
763
</DL>
764
<HR>
765
 
766
<A NAME="setOnscreenKeyboardVisible(boolean)"><!-- --></A><H3>
767
setOnscreenKeyboardVisible</H3>
768
<PRE>
769
void <B>setOnscreenKeyboardVisible</B>(boolean&nbsp;visible)</PRE>
770
<DL>
771
<DD>Sets the on-screen keyboard visible if available.
772
<P>
773
<DD><DL>
774
<DT><B>Parameters:</B><DD><CODE>visible</CODE> - visible or not</DL>
775
</DD>
776
</DL>
777
<HR>
778
 
779
<A NAME="vibrate(int)"><!-- --></A><H3>
780
vibrate</H3>
781
<PRE>
782
void <B>vibrate</B>(int&nbsp;milliseconds)</PRE>
783
<DL>
784
<DD>Vibrates for the given amount of time. Note that you'll need the permission
785
 <code> <uses-permission android:name="android.permission.VIBRATE" /></code> in your manifest file in order for this to work.
786
<P>
787
<DD><DL>
788
<DT><B>Parameters:</B><DD><CODE>milliseconds</CODE> - the number of milliseconds to vibrate.</DL>
789
</DD>
790
</DL>
791
<HR>
792
 
793
<A NAME="vibrate(long[], int)"><!-- --></A><H3>
794
vibrate</H3>
795
<PRE>
796
void <B>vibrate</B>(long[]&nbsp;pattern,
797
             int&nbsp;repeat)</PRE>
798
<DL>
799
<DD>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
800
 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
801
 the pattern at which to start the repeat.
802
<P>
803
<DD><DL>
804
<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - an array of longs of times to turn the vibrator on or off.<DD><CODE>repeat</CODE> - the index into pattern at which to repeat, or -1 if you don't want to repeat.</DL>
805
</DD>
806
</DL>
807
<HR>
808
 
809
<A NAME="cancelVibrate()"><!-- --></A><H3>
810
cancelVibrate</H3>
811
<PRE>
812
void <B>cancelVibrate</B>()</PRE>
813
<DL>
814
<DD>Stops the vibrator
815
<P>
816
<DD><DL>
817
</DL>
818
</DD>
819
</DL>
820
<HR>
821
 
822
<A NAME="getAzimuth()"><!-- --></A><H3>
823
getAzimuth</H3>
824
<PRE>
825
float <B>getAzimuth</B>()</PRE>
826
<DL>
827
<DD>The azimuth is the angle of the device's orientation around the z-axis. The positive z-axis points towards the earths
828
 center.
829
<P>
830
<DD><DL>
831
 
832
<DT><B>Returns:</B><DD>the azimuth in degrees<DT><B>See Also:</B><DD><a
833
      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></DL>
834
</DD>
835
</DL>
836
<HR>
837
 
838
<A NAME="getPitch()"><!-- --></A><H3>
839
getPitch</H3>
840
<PRE>
841
float <B>getPitch</B>()</PRE>
842
<DL>
843
<DD>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
844
 orthogonal to the z- and y-axis.
845
<P>
846
<DD><DL>
847
 
848
<DT><B>Returns:</B><DD>the pitch in degrees<DT><B>See Also:</B><DD><a
849
      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></DL>
850
</DD>
851
</DL>
852
<HR>
853
 
854
<A NAME="getRoll()"><!-- --></A><H3>
855
getRoll</H3>
856
<PRE>
857
float <B>getRoll</B>()</PRE>
858
<DL>
859
<DD>The roll is the angle of the device's orientation around the y-axis. The positive y-axis points to the magnetic north pole
860
 of the earth.
861
<P>
862
<DD><DL>
863
 
864
<DT><B>Returns:</B><DD>the roll in degrees<DT><B>See Also:</B><DD><a
865
      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></DL>
866
</DD>
867
</DL>
868
<HR>
869
 
870
<A NAME="getRotationMatrix(float[])"><!-- --></A><H3>
871
getRotationMatrix</H3>
872
<PRE>
873
void <B>getRotationMatrix</B>(float[]&nbsp;matrix)</PRE>
874
<DL>
875
<DD>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>.
876
 Does not manipulate the matrix if the platform does not have an accelerometer.
877
<P>
878
<DD><DL>
879
<DT><B>Parameters:</B><DD><CODE>matrix</CODE> - </DL>
880
</DD>
881
</DL>
882
<HR>
883
 
884
<A NAME="getCurrentEventTime()"><!-- --></A><H3>
885
getCurrentEventTime</H3>
886
<PRE>
887
long <B>getCurrentEventTime</B>()</PRE>
888
<DL>
889
<DD><DL>
890
 
891
<DT><B>Returns:</B><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>.</DL>
892
</DD>
893
</DL>
894
<HR>
895
 
896
<A NAME="setCatchBackKey(boolean)"><!-- --></A><H3>
897
setCatchBackKey</H3>
898
<PRE>
899
void <B>setCatchBackKey</B>(boolean&nbsp;catchBack)</PRE>
900
<DL>
901
<DD>Sets whether the BACK button on Android should be caught. This will prevent the app from being paused. Will have no effect
902
 on the desktop.
903
<P>
904
<DD><DL>
905
<DT><B>Parameters:</B><DD><CODE>catchBack</CODE> - whether to catch the back button</DL>
906
</DD>
907
</DL>
908
<HR>
909
 
910
<A NAME="setCatchMenuKey(boolean)"><!-- --></A><H3>
911
setCatchMenuKey</H3>
912
<PRE>
913
void <B>setCatchMenuKey</B>(boolean&nbsp;catchMenu)</PRE>
914
<DL>
915
<DD>Sets whether the MENU button on Android should be caught. This will prevent the onscreen keyboard to show up. Will have no
916
 effect on the desktop.
917
<P>
918
<DD><DL>
919
<DT><B>Parameters:</B><DD><CODE>catchMenu</CODE> - whether to catch the back button</DL>
920
</DD>
921
</DL>
922
<HR>
923
 
924
<A NAME="setInputProcessor(com.badlogic.gdx.InputProcessor)"><!-- --></A><H3>
925
setInputProcessor</H3>
926
<PRE>
927
void <B>setInputProcessor</B>(<A HREF="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</A>&nbsp;processor)</PRE>
928
<DL>
929
<DD>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
930
 <A HREF="../../../com/badlogic/gdx/ApplicationListener.html#render()"><CODE>ApplicationListener.render()</CODE></A> method each frame.
931
<P>
932
<DD><DL>
933
<DT><B>Parameters:</B><DD><CODE>processor</CODE> - the InputProcessor</DL>
934
</DD>
935
</DL>
936
<HR>
937
 
938
<A NAME="getInputProcessor()"><!-- --></A><H3>
939
getInputProcessor</H3>
940
<PRE>
941
<A HREF="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx">InputProcessor</A> <B>getInputProcessor</B>()</PRE>
942
<DL>
943
<DD><DL>
944
 
945
<DT><B>Returns:</B><DD>the currently set <A HREF="../../../com/badlogic/gdx/InputProcessor.html" title="interface in com.badlogic.gdx"><CODE>InputProcessor</CODE></A> or null.</DL>
946
</DD>
947
</DL>
948
<HR>
949
 
950
<A NAME="isPeripheralAvailable(com.badlogic.gdx.Input.Peripheral)"><!-- --></A><H3>
951
isPeripheralAvailable</H3>
952
<PRE>
953
boolean <B>isPeripheralAvailable</B>(<A HREF="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx">Input.Peripheral</A>&nbsp;peripheral)</PRE>
954
<DL>
955
<DD>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>
956
 this returns the whether the keyboard is currently slid out or not.
957
<P>
958
<DD><DL>
959
<DT><B>Parameters:</B><DD><CODE>peripheral</CODE> - the <A HREF="../../../com/badlogic/gdx/Input.Peripheral.html" title="enum in com.badlogic.gdx"><CODE>Input.Peripheral</CODE></A>
960
<DT><B>Returns:</B><DD>whether the peripheral is available or not.</DL>
961
</DD>
962
</DL>
963
<HR>
964
 
965
<A NAME="getRotation()"><!-- --></A><H3>
966
getRotation</H3>
967
<PRE>
968
int <B>getRotation</B>()</PRE>
969
<DL>
970
<DD><DL>
971
 
972
<DT><B>Returns:</B><DD>the rotation of the device with respect to its native orientation.</DL>
973
</DD>
974
</DL>
975
<HR>
976
 
977
<A NAME="getNativeOrientation()"><!-- --></A><H3>
978
getNativeOrientation</H3>
979
<PRE>
980
<A HREF="../../../com/badlogic/gdx/Input.Orientation.html" title="enum in com.badlogic.gdx">Input.Orientation</A> <B>getNativeOrientation</B>()</PRE>
981
<DL>
982
<DD><DL>
983
 
984
<DT><B>Returns:</B><DD>the native orientation of the device.</DL>
985
</DD>
986
</DL>
987
<HR>
988
 
989
<A NAME="setCursorCatched(boolean)"><!-- --></A><H3>
990
setCursorCatched</H3>
991
<PRE>
992
void <B>setCursorCatched</B>(boolean&nbsp;catched)</PRE>
993
<DL>
994
<DD>Only viable on the desktop. Will confine the mouse cursor location to the window and hide the mouse cursor.
995
<P>
996
<DD><DL>
997
<DT><B>Parameters:</B><DD><CODE>catched</CODE> - whether to catch or not to catch the mouse cursor</DL>
998
</DD>
999
</DL>
1000
<HR>
1001
 
1002
<A NAME="isCursorCatched()"><!-- --></A><H3>
1003
isCursorCatched</H3>
1004
<PRE>
1005
boolean <B>isCursorCatched</B>()</PRE>
1006
<DL>
1007
<DD><DL>
1008
 
1009
<DT><B>Returns:</B><DD>whether the mouse cursor is catched.</DL>
1010
</DD>
1011
</DL>
1012
<HR>
1013
 
1014
<A NAME="setCursorPosition(int, int)"><!-- --></A><H3>
1015
setCursorPosition</H3>
1016
<PRE>
1017
void <B>setCursorPosition</B>(int&nbsp;x,
1018
                       int&nbsp;y)</PRE>
1019
<DL>
1020
<DD>Only viable on the desktop. Will set the mouse cursor location to the given window coordinates (origin top-left corner).
1021
<P>
1022
<DD><DL>
1023
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the x-position<DD><CODE>y</CODE> - the y-position</DL>
1024
</DD>
1025
</DL>
1026
<!-- ========= END OF CLASS DATA ========= -->
1027
<HR>
1028
 
1029
 
1030
<!-- ======= START OF BOTTOM NAVBAR ====== -->
1031
<A NAME="navbar_bottom"><!-- --></A>
1032
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
1033
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
1034
<TR>
1035
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1036
<A NAME="navbar_bottom_firstrow"><!-- --></A>
1037
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
1038
  <TR ALIGN="center" VALIGN="top">
1039
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
1040
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
1041
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1042
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Input.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
1043
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
1044
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
1045
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1046
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1047
  </TR>
1048
</TABLE>
1049
</TD>
1050
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1051
libgdx API</EM>
1052
</TD>
1053
</TR>
1054
 
1055
<TR>
1056
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1057
&nbsp;<A HREF="../../../com/badlogic/gdx/Graphics.GraphicsType.html" title="enum in com.badlogic.gdx"><B>PREV CLASS</B></A>&nbsp;
1058
&nbsp;<A HREF="../../../com/badlogic/gdx/Input.Buttons.html" title="class in com.badlogic.gdx"><B>NEXT CLASS</B></A></FONT></TD>
1059
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1060
  <A HREF="../../../index.html?com/badlogic/gdx/Input.html" target="_top"><B>FRAMES</B></A>  &nbsp;
1061
&nbsp;<A HREF="Input.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
1062
&nbsp;<SCRIPT type="text/javascript">
1063
  <!--
1064
  if(window==top) {
1065
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
1066
  }
1067
  //-->
1068
</SCRIPT>
1069
<NOSCRIPT>
1070
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
1071
</NOSCRIPT>
1072
 
1073
 
1074
</FONT></TD>
1075
</TR>
1076
<TR>
1077
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1078
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
1079
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1080
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
1081
</TR>
1082
</TABLE>
1083
<A NAME="skip-navbar_bottom"></A>
1084
<!-- ======== END OF BOTTOM NAVBAR ======= -->
1085
 
1086
<HR>
1087
 
1088
                                <div style="font-size:9pt"><i>
1089
                                Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
1090
                                </i></div>
1091
 
1092
</BODY>
1093
</HTML>