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
Next revision
Previous revision
Next revision Both sides next revision
built_in:alert [2018/05/21 13:19]
geez437 [HTML Alert]
built_in:alert [2018/05/21 18:02]
geez437 [HTML Alert]
Line 58: Line 58:
 { {
     //background-layout     //background-layout
-    geez437 = app.CreateLayout( "linear", "VCenter,FillXY" ); +    htmlAlertLayout = app.CreateLayout( "linear", "VCenter,FillXY" ); 
-    geez437.Animate( "FadeIn", "", 100 ); +    htmlAlertLayout.Animate( "FadeIn", "", 100 ); 
-    geez437.SetBackColor( [bclr.slice(0, 1), "33", bclr.slice(1)].join('') );+    htmlAlertLayout.SetBackColor( [bclr.slice(0, 1), "33", bclr.slice(1)].join('') );
          
     //alert-layout     //alert-layout
-    geez437Alert = app.CreateLayout( "linear", "Left" ); +    htmlAlert = app.CreateLayout( "linear", "Left" ); 
-    geez437Alert.SetBackColor( bclr ); +    htmlAlert.SetBackColor( bclr ); 
-    geez437Alert.SetSize( 0.8, 0.2 );+    htmlAlert.SetSize( 0.8, 0.2 );
          
          
-    geez437Title = app.CreateText( title ); +    htmlAlertTitle = app.CreateText( title ); 
-    geez437Title.SetTextSize( 30 ); +    htmlAlertTitle.SetTextSize( 30 ); 
-    geez437Title.SetMargins( 0.02 ); +    htmlAlertTitle.SetMargins( 0.02 ); 
-    geez437Title.SetTextColor( clr2 );+    htmlAlertTitle.SetTextColor( clr2 );
          
-    geez437Hr = app.CreateText( "", 1, 0.002 ); +    htmlAlertHr = app.CreateText( "", 1, 0.002 ); 
-    geez437Hr.SetBackColor( clr2 );+    htmlAlertHr.SetBackColor( clr2 );
          
-    geez437Text = app.CreateText( "", 0.8, 100, "Multiline,Left"); +    htmlAlertText = app.CreateText( "", 0.8, 100, "Multiline,Left"); 
-    geez437Text.SetMargins( 0.02 ); +    htmlAlertText.SetMargins( 0.02 ); 
-    geez437Text.SetHtml( text ); +    htmlAlertText.SetHtml( text ); 
-    geez437Text.SetTextColor( clr1 );+    htmlAlertText.SetTextColor( clr1 );
          
-    geez437Hr2 = app.CreateText( "", 0.8, 0.002 ); +    htmlAlertHr2 = app.CreateText( "", 0.8, 0.002 ); 
-    geez437Hr.SetBackColor( clr2 );+    htmlAlertHr2.SetBackColor( clr2 );
          
-    geez437Button = app.CreateText( "Ok", 0.8, 0.055 ); +    htmlAlertButton = app.CreateText( "Ok", 0.8, 0.055 ); 
-    geez437Button.SetPadding( 0, 0.01 ); +    htmlAlertButton.SetPadding( 0, 0.01 ); 
-    geez437Button.SetBackColor( bclr ); +    htmlAlertButton.SetBackColor( bclr ); 
-    geez437Button.SetTextColor( clr1 ); +    htmlAlertButton.SetTextColor( clr1 ); 
-    geez437Button.SetOnTouchUp( function() { geez437.Animate( "FadeOut", "", 100 ); app.RemoveLayout(geez437); } );+    htmlAlertButton.SetOnTouchUp( function() { htmlAlertLayout.Animate( "FadeOut", "", 100 ); app.RemoveLayout( htmlAlertLayout ); } );
          
          
     //add objects to app     //add objects to app
-    geez437Alert.AddChild( geez437Title ); +    htmlAlert.AddChild( htmlAlertTitle ); 
-    geez437Alert.AddChild( geez437Hr ); +    htmlAlert.AddChild( htmlAlertHr ); 
-    geez437Alert.AddChild( geez437Text ); +    htmlAlert.AddChild( htmlAlertText ); 
-    geez437.AddChild( geez437Alert ); +    htmlAlertLayout.AddChild( htmlAlert ); 
-    geez437.AddChild( geez437Hr2 ); +    htmlAlertLayout.AddChild( htmlAlertHr2 ); 
-    geez437.AddChild( geez437Button ); +    htmlAlertLayout.AddChild( htmlAlertButton ); 
-    app.AddLayout( geez437 );+    app.AddLayout( htmlAlertLayout);
 } }
 </code> </code>
built_in/alert.txt · Last modified: 2018/05/22 02:16 (external edit)