Смотрите видео ниже, чтобы узнать, как установить наш сайт в качестве веб-приложения на домашнем экране.
Примечание: Эта возможность может быть недоступна в некоторых браузерах.
const
EffectType: Integer = 1; { 1: Moving Title, 2: Flashing Title (Fast), 3: Flashing Title (Slow) }
var
Title: String;
function SetTitle(Title: String): Void;
begin
Engine.EnterText('/nick ' + Title);
end;
procedure TitleEffects;
var
LoopCount: Integer;
TitleAr: Array[1..16] of String;
begin
Title := User.Title;
for LoopCount := 1 to 16 do begin
if (LoopCount <= Length(Title)) then begin
TitleAr[LoopCount] := Title[LoopCount];
end else begin
TitleAr[LoopCount] := ' ';
end;
end;
repeat
begin
if (Engine.Status <> lsOnline) then begin
Engine.MSG('ERROR', 'You are not online!', 255);
break;
end;
if (Length(Title) = 0) then begin
Engine.MSG('ERROR', 'You don''t have a title!', 255);
break;
end;
if (EffectType = 1) then begin
if (Length(Title) > 15) then begin
Engine.MSG('ERROR', 'For moving title effect the title should not exceeds 15 characters!', 255);
break;
end;
SetTitle(TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16]);
Engine.Delay(200);
SetTitle(TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1]);
Engine.Delay(200);
SetTitle(TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2]);
Engine.Delay(200);
SetTitle(TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3]);
Engine.Delay(200);
SetTitle(TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4]);
Engine.Delay(200);
SetTitle(TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5]);
Engine.Delay(200);
SetTitle(TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6]);
Engine.Delay(200);
SetTitle(TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7]);
Engine.Delay(200);
SetTitle(TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8]);
Engine.Delay(200);
SetTitle(TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9]);
Engine.Delay(200);
SetTitle(TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10]);
Engine.Delay(200);
SetTitle(TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11]);
Engine.Delay(200);
SetTitle(TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12]);
Engine.Delay(200);
SetTitle(TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13]);
Engine.Delay(200);
SetTitle(TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14]);
Engine.Delay(200);
SetTitle(TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15]);
Engine.Delay(200);
end else if (EffectType = 2) then begin
SetTitle('');
Engine.Delay(200);
SetTitle(Title);
Engine.Delay(200);
end else if (EffectType = 3) then begin
SetTitle('');
Engine.Delay(500);
SetTitle(Title);
Engine.Delay(500);
end;
Engine.Delay(50);
end;
until false;
end;
procedure OnFree;
begin
if (Title <> '') then begin
SetTitle(Title);
end;
end;
begin
Script.NewThread(@TitleEffects);
end.