| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Status Bar |
I would like to see how you drew your status bar please.
heya...it wasn't addressed to me, but I'll send you my status bar
routine anyway ;)
Procedure DVWRITE(X,Y:word;S:String;Back,Fore,BLNK:byte);
Var
I,I2:integer;
begin
If (X>80) or (Y>25) or (X<1) or (Y<1) then Exit;
If X+Length(S)>81 then Exit;
DEC(X);
DEC(Y);
I2:=0;
For I:= 0 to Length(S)-1 do
begin
Mem[$B800: (160 * y)+(x*2)+I2]:=Ord(S[I+1]);
Mem[$B800: (160 * y)+(x*2)+I2+1]:=BLNK+(Back SHL 4)+Fore;
INC(I2,2);
end;
End;
procedure status_bar (Var p); FAR;
var tmpx,tmpy:integer;
tmpx2,tmpy2:word;
tmpt:integer;
statusline:string;
tmp:string;
tmp2:integer;
parent_id: Word ABSOLUTE p;
runs,truns:integer;
tmp3:string;
begin
runs:=0; {to start with}
truns:=0;
repeat
runs:=runs+1;
truns:=truns+1;
switch_task;
if runs>=40 then begin {every 1000th time it is called it will run}
runs:=0;
tmpx:=wherex; tmpy:=wherey;
tmpx2:=windmin; tmpy2:=windmax;
tmpt:=textattr;
window(1,25,80,25);
gotoxy(1,25);
textcolor(black);
textbackground(lightgray);
{add the alias to the status line - pos 1 - 20}
statusline:=userrecs.handle;
{make spaces till the 20th pos}
repeat
statusline:=statusline+' ';
until length(statusline)>=18;
{add the real name, pos 20+}
statusline:=statusline+userrecs.realname;
repeat
statusline:=statusline+' ';
until length(statusline)>=30;
statusline:=statusline+' [Node '+inttostr(node)+'] ['
+inttostr(actualbaud)+' Baud]';
repeat
statusline:=statusline+' ';
until length(statusline)>=58;
statusline:=statusline+progname+' '+ever+' '+eyear;
write(statusline);
for tmp2:=1 to (79-(length(statusline))) do write(' ');
dvwrite(80,25,' ',7,0,0);
window((lo(tmpx2)+1),(hi(tmpx2)+1),(lo(tmpy2)+1),(hi(tmpy2)+1));
gotoxy(tmpx,tmpy);
textattr:=tmpt;
end; {end of printing the status bar}
if (not(carrier(comport))) or (equinox.inactive) or (logoff) and
(keepon=false)then begin {if carrier dropped, user inactive,
logoff
selected AND keepon is set to false,
will
exit; If keepon is set to true then it
will
stay online..eg during virus scans}
{check for what errorlevel to exit at here..eg if echomail entered
exit with erl 5, if they dropped carrier without entering a name,
exit with erl 2, if they logged off normally exit with erl 3}
halt(0);
end;
if runs >=30 then
TimeSlice; {*** NOTE: Since the program ends up
here
when it's got nothing better to do, we
will
give the multitasker (if any) the
timeslice...}
until true=false; {a very, very, very long time}
end;
seeya ;)
shezza
... Borg Burgers: We do it our way. Your way is irrelevant!!
--- MZK Tag v2.0. (C) Copyright 1995 Matt Marlor
--- Ezycom V1.20
* Origin: Starship Junkyard -- 07-3202-8498 (3:640/323)SEEN-BY: 633/267 270 @PATH: 640/323 891 257 201 820 711/409 808 50/99 635/728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.