Game Development Reference
In-Depth Information
Catching Android's soft keys
You might want to catch Android's soft keys to add an extra handling code for them.
If you want to catch the back button, call Gdx.input.setCatchBackKey(true) , and
if you want to catch the menu button, call Gdx.input.setCatchMenuKey(true) .
On a desktop where you have a mouse pointer, you can tell LibGDX to catch it so that
you get a permanent mouse input without having the mouse ever leave the application
window. To catch the mouse cursor, call Gdx.input.setCursorCatched(true) .
The files module
The files module can be accessed either through Gdx.getFiles() or using the
shortcut variable: Gdx.files .
Getting an internal file handle
You can get a file handle for an internal file by calling Gdx.files.internal() .
An internal file is relative to the assets folder on the Android and WebGL
platforms. On a desktop, it is relative to the root folder of the application.
Getting an external file handle
You can get a file handle for an external file by calling Gdx.files.external() .
An external file is relative to the SD card on the Android platform. On a
desktop, it is relative to the user's home folder. Note that this is not available
for WebGL applications.
The network module
The network module can be accessed either through Gdx.getNet() or using the
shortcut variable: Gdx.net .
HTTP requests
You can make HTTP requests by calling Gdx.net.sendHttpRequest() or cancel
them by calling Gdx.net.cancelHttpRequest() .
 
Search WWH ::




Custom Search