DroidScript wiki

(was AndroidScript) unofficial documentation by the community

User Tools

Site Tools


built_in:nxt_isconnected

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
built_in:nxt_isconnected [2015/03/10 21:05]
madlyr [Example - IsConnected Connect / Disconnect to NXT with FontAwesome icons]
built_in:nxt_isconnected [2015/03/11 10:03] (current)
madlyr [Example - IsConnected Connect / Disconnect to NXT with FontAwesome icons]
Line 6: Line 6:
 ====Example - IsConnected Connect / Disconnect to NXT with FontAwesome icons==== ====Example - IsConnected Connect / Disconnect to NXT with FontAwesome icons====
 <file javascript NxtConnect.js>​ <file javascript NxtConnect.js>​
-var nxt, lay;+var nxt, lay, btnConnect;
 function OnStart() function OnStart()
 { {
   lay = app.CreateLayout( "​Linear",​ "​VCenter,​ FillXY"​ );   lay = app.CreateLayout( "​Linear",​ "​VCenter,​ FillXY"​ );
- 
   //Create Connect button.   //Create Connect button.
   btnConnect = app.CreateButton( "​[fa-plug] Connect",​ 0.5, 0.08, "​Gray,​FontAwesome"​ );   btnConnect = app.CreateButton( "​[fa-plug] Connect",​ 0.5, 0.08, "​Gray,​FontAwesome"​ );
Line 17: Line 16:
   btnConnect.SetOnTouch( btnConnect_OnTouch );  ​   btnConnect.SetOnTouch( btnConnect_OnTouch );  ​
   lay.AddChild( btnConnect );   lay.AddChild( btnConnect );
- 
   app.AddLayout( lay );   app.AddLayout( lay );
  
built_in/nxt_isconnected.txt ยท Last modified: 2015/03/11 10:03 by madlyr