AddDrawer

Use the AddDrawer method to add a layout as drawer to the App. They can be located on the left or right side in your app and can be shown when sliding the finger from the border to the middle of the screen.

Note: Drawer layouts are equal to normal layouts - they are just added to the app via addDrawer() instead of addLayout()

app.AddDrawer( layout, side, width );

See also Layouts

Example

function OnStart()
{
  lay = app.CreateLayout( "Linear", "FillXY,VCenter" );
 
  txt1 = app.CreateText( "<-- swipe" );
  txt1.SetTextSize( 30 );
  lay.AddChild( txt1 );
 
  app.AddLayout( lay );
 
  layDrawer = app.CreateLayout( "Linear", "VCenter" );
  layDrawer.SetBackground( "/Sys/Img/BlueBack.png" );
 
  txt2 = app.CreateText( "Hello" );
  txt2.SetTextSize( 40 );
  layDrawer.AddChild( txt2 );
 
  app.AddDrawer( layDrawer, "left", 0.8 );
}