summaryrefslogtreecommitdiff
path: root/fpcdocs/mmouseex/mouse10.pp
blob: cd88431da1afa477d3227252d52bdb28537176c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Uses MsMouse, Crt;

Var hor, vert: Longint;
    x, y: Longint;

Begin
  If MouseFound Then
    Begin
      ClrScr;
      Writeln('Click any button to quit after you''ve entered a sequence of numbers.');
      Writeln;
      Writeln('Horizontal mickey''s per pixel:');
      Writeln('Vertical mickey''s per pixel:');
      ShowMouse;
      Repeat
        GotoXY(32,3);
        ClrEol;
        Readln(hor);
        GotoXY(30,4);
        ClrEol;
        Readln(vert);
        SetMouseSpeed(hor, vert);
      Until (GetLastButtonPress(LButton,x,y) <> 0) Or
            (GetLastButtonPress(RButton,x,y) <> 0) Or
            (GetLastButtonPress(MButton,x,y) <> 0);
    End
End.