DroidScript wiki

(was AndroidScript) unofficial documentation by the community

User Tools

Site Tools


built_in:alert

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:alert [2018/05/21 18:02]
geez437 [HTML Alert]
built_in:alert [2018/05/21 18:16] (current)
geez437 [HTML Alert]
Line 67: Line 67:
     htmlAlert.SetSize( 0.8, 0.2 );     htmlAlert.SetSize( 0.8, 0.2 );
     ​     ​
-    ​+    ​//​title-text
     htmlAlertTitle = app.CreateText( title );     htmlAlertTitle = app.CreateText( title );
     htmlAlertTitle.SetTextSize( 30 );     htmlAlertTitle.SetTextSize( 30 );
Line 73: Line 73:
     htmlAlertTitle.SetTextColor( clr2 );     htmlAlertTitle.SetTextColor( clr2 );
     ​     ​
 +    //​horizontal line below
     htmlAlertHr = app.CreateText( "",​ 1, 0.002 );     htmlAlertHr = app.CreateText( "",​ 1, 0.002 );
     htmlAlertHr.SetBackColor( clr2 );     htmlAlertHr.SetBackColor( clr2 );
     ​     ​
 +    //text in alert
     htmlAlertText = app.CreateText( "",​ 0.8, 100, "​Multiline,​Left"​);​     htmlAlertText = app.CreateText( "",​ 0.8, 100, "​Multiline,​Left"​);​
     htmlAlertText.SetMargins( 0.02 );     htmlAlertText.SetMargins( 0.02 );
Line 81: Line 83:
     htmlAlertText.SetTextColor( clr1 );     htmlAlertText.SetTextColor( clr1 );
     ​     ​
 +    //​horizontal line below
     htmlAlertHr2 = app.CreateText( "",​ 0.8, 0.002 );     htmlAlertHr2 = app.CreateText( "",​ 0.8, 0.002 );
     htmlAlertHr2.SetBackColor( clr2 );     htmlAlertHr2.SetBackColor( clr2 );
     ​     ​
 +    //"​Ok"​ button
     htmlAlertButton = app.CreateText( "​Ok",​ 0.8, 0.055 );     htmlAlertButton = app.CreateText( "​Ok",​ 0.8, 0.055 );
     htmlAlertButton.SetPadding( 0, 0.01 );     htmlAlertButton.SetPadding( 0, 0.01 );
Line 89: Line 93:
     htmlAlertButton.SetTextColor( clr1 );     htmlAlertButton.SetTextColor( clr1 );
     htmlAlertButton.SetOnTouchUp( function() { htmlAlertLayout.Animate( "​FadeOut",​ "",​ 100 ); app.RemoveLayout( htmlAlertLayout ); } );     htmlAlertButton.SetOnTouchUp( function() { htmlAlertLayout.Animate( "​FadeOut",​ "",​ 100 ); app.RemoveLayout( htmlAlertLayout ); } );
-    ​ 
     ​     ​
     //add objects to app     //add objects to app
built_in/alert.txt ยท Last modified: 2018/05/21 18:16 by geez437