home *** CD-ROM | disk | FTP | other *** search
- {*********************************************************}
- {* GtMOUSE.PAS 1.00 *}
- {* Copyright (c) I.Evsikov, S.Shmakov & P.Sychov, 1993 *}
- {* All rights reserved. *}
- {* Demo with mouseLib6 *}
- {*********************************************************}
- program LibDemo;
-
- uses
- gtMouse,
- mouseLib,
- Crt;
-
- var Finish : boolean;
- begin
- clrScr;
- Finish:=false;
- if not (mouse_present) then begin
- { mouse_present was set by the mouseLib initialization code .. }
- write('mouse not installed');
- exit;
- end;
- writeln;
- writeln(' ┌──────────────────────────────────────────────────────────┐');
- writeln(' │GtMouse with MouseLib6 demo program,(c) 1993 ,Igor Evsikov│');
- writeln(' └──────────────────────────────────────────────────────────┘');
- writeln(' ┌──────────────────────────────────────────────────────────┐');
- writeln(' │ Move Cursor, Press Right & Left buttons │');
- writeln(' │ Press Esc for Exit │');
- writeln(' └──────────────────────────────────────────────────────────┘');
- writeln(' ┌──────────────────────────────────────────────────────────┐');
- writeln(' │ │');
- writeln(' │ │');
- writeln(' │ │');
- writeln(' │ │');
- writeln(' │ │');
- writeln(' │ │');
- writeln(' │ │');
- writeln(' │ │');
- writeln(' │ │');
- writeln(' │ │');
- writeln(' │ │');
- writeln(' └──────────────────────────────────────────────────────────┘');
- writeln(' ┌──────────────────────────────────────────────────────────┐');
- writeln(' │ S l e e p i n g H e r e │');
- writeln(' └──────────────────────────────────────────────────────────┘');
- window(30, 10, 60, 20);
- InitSleepper(10,10,22,70,24);
- showMouseCursor; { display the cursor }
- repeat
- if getButton(leftButton) = buttonDown then
- begin
- hideMouseCursor; { we hide the cursor }
- writeLn('Left Button Pressed');
- showMouseCursor; { display the cursor }
- end;
- if getButton(rightButton) = buttonDown then
- begin
- hideMouseCursor; { we hide the cursor }
- writeLn('Right Button Pressed');
- showMouseCursor; { display the cursor }
- end;
- if keypressed then Finish:=(readKey=^[);
- until Finish;
- hideMouseCursor; { we hide the cursor }
- end.
-