home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
library
/
dos
/
tvision
/
gtmous
/
opdemo.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-09-30
|
4KB
|
87 lines
{*********************************************************}
{* GtMOUSE.PAS 1.00 *}
{* Copyright (c) I.Evsikov, S.Shmakov & P.Sychov, 1993 *}
{* All rights reserved. *}
{* Demo with Object Profesional 1.10 *}
{* Copyright (c) TurboPower Software 1988, 1989. *}
{*********************************************************}
{$M 2000,4000, 14000}
program OPDemo;
uses
gtMouse,
opMouse,
Dark,
opCrt;
Const
Hand: ImageArray=($C0,$A0,$50,$2B,$15,$2E,$5F,$BF,$7F,$3F,$1F,$1F,$1F,$1F,$00,$00);
var
Finish : boolean;
Button : word;
CONST newarray : Array[1..8] of Char =
(^A,^B,^C,^T,'╠','═','╬','╧');
var crtmode : byte;
begin
Randomize;
crtmode:=getcrtmode;
Finish:=false;
InitializeMouse;
if not MouseInstalled then begin
writeln('Mouse not installed');
Halt;
end;
EnableEventHandling;
clrScr;
LinkUserImageWith(UserArrow,Hand);
setNewCharacters(newarray);
SelectNotPressedImage(UserArrow);
setVGA8x16;
writeln;
writeln(' ┌──────────────────────────────────────────────────────────┐');
writeln(' │GtMouse with OPMouse 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);
{**********************************************************************}
ShowMouse; { display the cursor }
{***********************************************************************}
HiddenCursor;
repeat
if MousePressed then begin
hideMouse; { we hide the cursor }
Button:=MouseKeyWord;
if Button=MouseLft then writeLn('Left Button Pressed');
if Button=MouseRt then writeLn('Right Button Pressed');
if Button=MouseBoth then writeLn('Both Buttons Pressed');
showMouse; { display the cursor }
end;
if keypressed then Finish:=(readKey=^[);
InitSleeper(Random(5),10,10,22,70,24);
Sleeper;
until Finish;
hideMouse; { we hide the cursor }
DisableEventHandling;
ReturnVGA:=true;
NormalCursor;
end.