NetLizard
Splash screen
Kod · JavaScript83 qator
function OnReady()

{

//appname- dasturingiz nomi.

  var appname = "Mening dasturim"



  //kutish progressini yashirish.

  app.HideProgress();

  

  // Splash screen uchun layout yaratish.

 laySplash = app.CreateLayout( "linear", "VCenter,FillXY" );

//layout orqasini qora rang qilish

 laySplash.SetBackColor( "yellow" ); 

 

 //splash screenda iconkali rasm chiqarish

  var imgPath = "Img/Splash.png";

 var img = app.CreateImage( imgPath, 0.5 );

 laySplash.AddChild( img );

 

 //splash screenda splash rasmidan keyin dastur nomini chiqarish.

 var txt = app.CreateText( appname );

        txt.SetBackColor("black");

        txt.SetTextColor("white");

 txt.SetTextSize( 24 );

 txt.SetPadding(0.05, 0.02, 0.05, 0.02)

 txt.SetMargins(0.01, 0.1, 0.01, 0.1);

 laySplash.AddChild( txt );

 

 //dastur nomidan keyin, slogan qoshish.

 var txt2 = app.CreateText( "Hush kelibsiz Example dasturiga!",0.8,-1,"multiLine" );

 txt2.SetTextSize( 20 );

 txt2.SetBackColor( "red" );

 txt2.SetTextColor( "white" );

 txt2.SetPadding( 0.03, 0.03, 0.03, 0.03 );

 laySplash.AddChild( txt2 );

 

 //lay layoutni dasturga qoshish.

 app.AddLayout( laySplash );

 

 //splash screenni avto ochirish/avto bekor qilish.

 var delay = 5000 //bu yerda delay=millisekundlar.

 setTimeout(function(){laySplash.Animate("FadeOut",null,1000)},delay)

}

*- bu orqali o'z dasturlaringizga splash screen qo'yishingiz mumkin.