Back

DisableTouch

Hello World

Use this method to prevent any user interaction with the app.

app.DisableTouch( disable )

You could use this for a safe mode for a slideshow.

Example - Demo

function OnStart()
{
    lay = app.CreateLayout( "linear", "VCenter,FillXY,touchspy" );

    btn = app.CreateButton( "Disable", 0.3, 0.1 );
    btn.SetOnTouch( btn_OnTouch );
    lay.AddChild( btn );

    app.AddLayout( lay );
}

function btn_OnTouch()
{
    app.DisableTouch( true );
    app.ShowPopup( "Touch Disabled." );
}
    Copy     Copy All       Run      
boolean