DroidScript wiki

(was AndroidScript) unofficial documentation by the community

User Tools

Site Tools


built_in:get_joystick_name

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

built_in:get_joystick_name [2015/11/02 09:35] (current)
octazid created
Line 1: Line 1:
 +=====GetJoystickName=====
  
 +//​(Information and examples taken from the DroidScript documentation)//​
 +
 +====Description====
 +
 +The **GetJoystickName** method gets the name of a **HID** Joystick or Gamepad (For example, an Xbox 360 controller connected to your device via an OTG cable).
 +
 +<​code>​app.GetJoystickName( joyNum );</​code>​
 +
 +GetJoystickName can get the name of multiple HID controllers currently connected to your device. Pass **0** to GetJoystickName for the first controller, **1** for the second, etc.
 +----
 +
 +====Example====
 +
 +<code javascript>​
 +function OnStart()
 +{
 +  name = app.GetJoystickName( 0 );
 +  app.ShowPopup( name );
 +}
 +</​code>​
built_in/get_joystick_name.txt ยท Last modified: 2015/11/02 09:35 by octazid