滚屏配置
2022年8月1日 更新
开启更多功能,提升办公效能

白猪滚屏也是通过自定义实现的,服务端已经封装好了函数。找到文件 extendUIs.pas 。滚屏函数为 ServerSayPlus


//滚屏函数
procedure ServerSayPlus(content:string);
var wordlen, time, endpoint, txtlen:integer;
begin
wordlen := 18;
time := 5;
endpoint := -500;
txtlen := Length(content);
time := Round(txtlen * 0.2);
endpoint := endpoint - txtlen * wordlen;
ServerSay('NC=Bg:alert:bg:center:0:nil:240|AutoHide:'+inttostr(time)+'|1:S-1:270:18:500:30:0|1@S-1:Text:600:nil:18:'+content+'@243:left:'+inttostr(endpoint)+':nil:'+inttostr(time)+'', 5);
end;

其中的参数不要去调整,但自定义的内容可以微调,比如字体大小、颜色等。

1@S-1:Text:600:nil:18:'+content+'@243:left……

18:是字体大小

243:是默认颜色,根据自己的喜好调整



使用方法:

//首先需要引用 extendUIs.pas,随后直接调用函数即可。
ServerSayPlus('大神登陆了热血传奇!');