Todo: Documentation for %PLUGINNAME%
In order to use %PLUGINNAME%, you must first load the plugin at the top of your script
using the LoadPlugin method like this:
app.LoadPlugin( "%PLUGINNAME%" );
Then you can create an instance of the plugin object when you need it like this:
plg = app.Create%PLUGINNAME%();
Examples:
Example - Get Version
app.LoadPlugin( "%PLUGINNAME%" );
function OnStart()
{
lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
btn = app.CreateButton( "Press Me" );
btn.SetOnTouch( CallPlugin );
lay.AddChild( btn );
plg = app.Create%PLUGINNAME%();
app.AddLayout( lay );
}
function CallPlugin()
{
alert( plg.GetVersion() );
}
Example - Create Button
app.LoadPlugin( "%PLUGINNAME%" );
function OnStart()
{
lay = app.CreateLayout( "Linear", "VCenter,FillXY" );
plg = app.Create%PLUGINNAME%();
btn = plg.CreateMyButton( "Hello", 0.4, 0.2 );
lay.AddChild( btn );
app.AddLayout( lay );
}