home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_PAS
/
XLIB_TP5.ZIP
/
DEMO
/
TESTMOUS.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-12-13
|
2KB
|
79 lines
uses crt,dos,X_Const,X_main,X_Mouse,X_Text,X_Rect,x_Pal;
const y = 150;
x = 100;
Msg = 'Press any Key to Exit';
var i,x1,y1,r:Word;
procedure Show_pal2;
var i,j,f:Word;
begin;
for i:=0 to 5 do for j:=0 to 41 do
begin;
f:=i*42+j;
box(j*8,5+i*19,j*8+6,5+i*19+15,f);
end;
for i:=252 to 255 do Box(336,5+(i-252)*19,342,5+(i-252)*19+15,i);
end;
const Test = 'This «23»is «216»a «o»test «36»for «138»me.';
var mx,my,st:Word;
begin;
WriteLn('! All Modes with 256 Color ! Some Modes only on Multisync.'#10#13);
for st:=0 to x_Max_Modi do
begin;
x_mode_info(st,mx,my);
Write('[',st:2,'] with ',mx,'x',my,' Pixel. ');
if odd(st) then WriteLn;
end;
Write('Select Mode ?');
ReadLn(i);
x_set_Mode(i,400);
X_ClearAll;
x_Set_RGB_Pal;
x_text_init;
x_set_font(0);
i:=50;
for x1:=1 to GetMaxX div i do Line(x1*i,0,x1*i,GetMaxY-1,Gray5);
for y1:=1 to GetMaxY div i do Line(0,y1*i,GetMaxX-1,y1*i,Gray5);
MyMouseInit;
DefineMouseCursor(MyMouseForm,Gray5);
OldMouseTyp := true;
Show_Pal2;
E_Write(GetMaxX-x_Length(Msg)-1,GetMaxY-x_font_height-1,Gray5,Gray2,Msg);
E_WriteColor(10,GetMaxY-2*x_font_height-1,Gray5,Gray3,Test);
ShowMouse;
MouseAction:=True;
repeat
if MouseAction then
begin;
WaitVsyncStart;
HideMouse;
mx:=MouseX;my:=MouseY;st:=ButtonStatus;
Box(1,GetMaxY-4*x_font_height,GetMaxX,GetMaxY-3*x_font_height,0);
X_Write(1,GetMaxY-4*x_font_height,Gray5,'('+center(40,str(mx))+','+center(40,str(my))+
') : '+center(50,str(GetPixel(mx,my)))+' Status :'+str(st));
ShowMouse;
MouseAction:=False;
end;
until keypressed;
MyMouseDestroy;
TextMode(LastMode);
end.