Show/Hide the debug console as black overlay in your app.
See Also: Debug, IsDebugVisible
Example - Debug Overlay
function OnStart()
{
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
tgl = app.AddToggle( lay, "Toggle Debug", -1, 0.1 );
tgl.SetOnTouch( ShowDebug );
app.AddLayout( lay );
}
function ShowDebug( show )
{
app.ShowDebug( show );
}
from native import app
def OnStart():
lay = app.CreateLayout("linear", "VCenter,FillXY")
tgl = app.AddToggle(lay, "Toggle Debug", -1, 0.1)
tgl.SetOnTouch(ShowDebug)
app.AddLayout(lay)
def ShowDebug(show):
app.ShowDebug(show)
Example - Debug Dialog
function OnStart()
{
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
tgl = app.AddButton( lay, "Show Debug Dialog", -1, 0.1 );
tgl.SetOnTouch( ShowDebug );
app.EnableBackKey( false );
app.AddLayout( lay );
}
function ShowDebug()
{
app.ShowDebug( true, "dialog" );
app.ShowPopup( "Press [BACK] to close." );
}
function OnBack()
{
if( app.IsDebugVisible() ) {
app.ShowDebug( false );
}
}
from native import app
def OnStart():
lay = app.CreateLayout("linear", "VCenter,FillXY")
tgl = app.AddButton(lay, "Show Debug Dialog", -1, 0.1)
tgl.SetOnTouch(ShowDebug)
app.EnableBackKey(False)
app.AddLayout(lay)
def ShowDebug():
app.ShowDebug(True, "dialog")
app.ShowPopup("Press [BACK] to close.")
def OnBack():
if app.IsDebugVisible():
app.ShowDebug(False)
else:
app.Exit()