begin
ax := $3;
Intr($33,Reg);
X := ex;
Y :° dx end else begin
X := -1;
Y := -1 end end; (MouseWhereXV) ;.- —————————— ————;
Procedure MouseGotoXY(X,Y: Integer);
{Ïåðåâîäèò óêàçàòåëü èûøè â íîâîå ïîëîæåíèå: X,Y - âèðòóàëüíûå êîîðäèíàòû} begin
if IsMouse then with Reg do
begin
ax := $4;
ex :» X;
dx := Y;
Intr($33,Reg) end end; {MouseGotoXY} ^———————————————^
Function MouseWhereX: Byte;
{Âîçâðàùàåò ãîðèçîíòàëüíóþ òåêñòîâóþ êîîðäèíàòó} begin
if IsMouse then with Reg do begin
ax := $3;
Intr($33,Reg) ;
MouseWhereX := MouseTextCooX(ex) end else
MouseWhereX := 0 end; {MouseWhereX) /___—————————————_
Function MouseWhereY: Byte;
{Âîçâðàùàåò òåêñòîâóþ êîîðäèíàòó ïî âåðòèêàëè} begin
if IsMouse then with Reg do begin
ax :- $3;
Intr($33,Reg) ;
MouseWhereY :=- MouseTextCooY(dx) end else
MouseWhereY := 0 end; {MoueseWhereY} ^———————————————;
Function MouseIn(XI,Y1,X2,Y2: Integer): Boolean;
{Âîçâðàùàåò TRUE, åñëè óêàçàòåëü íàõîäèòñÿ â çàäàííîì ïðÿìîóãîëüíèêå} begin
if IsMouse then with Reg do begin
ax :- $3;
Intr($33,Reg) ;
MouseIn := (cx>=Xl) and (cx<=X2) and (dx>-Yl) and (dx<=Y2)