Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
|
|
@ -1,43 +1,38 @@
|
|||
\12345678901234567890123456789012345
|
||||
\Window creation............... X .
|
||||
\012345678901234567890123456789012345
|
||||
\ Window creation............... X .
|
||||
|
||||
def X0=20, Y0=10; \upper-left corner of window's position (chars)
|
||||
int Mouse, Button, C;
|
||||
def X0=20, Y0=10; \position of upper-left corner of window (chars)
|
||||
int Mouse, Button, X, Y;
|
||||
|
||||
func GetButton; \Return soft button number at mouse pointer
|
||||
int X, Y;
|
||||
[Mouse:= GetMouse;
|
||||
X:= Mouse(0)/8 - X0; \convert pixels to char cells
|
||||
[Mouse:= GetMouse; \get pointer to mouse array information
|
||||
X:= Mouse(0)/8 - X0; \convert pixels to 8x16-pixel character cells
|
||||
Y:= Mouse(1)/16 - Y0;
|
||||
if X>=32 & X<=34 & Y=0 then return 0; \exit [X]
|
||||
if X>=32 & X<=34 & Y=0 then return 0; \exit [X]
|
||||
return -1; \mouse not on any soft button
|
||||
];
|
||||
|
||||
[SetVid($12); \640x480 graphics
|
||||
TrapC(true); \disable Ctrl+C
|
||||
Attrib($70); \black on gray
|
||||
SetWind(0+X0, 0+Y0, 35+X0, 8+Y0, 0, \fill\true);
|
||||
Cursor(33+X0, 0+Y0); Text(6, "X");
|
||||
|
||||
Attrib($1F); \bright white on blue, for title
|
||||
[SetVid($12); \set 640x480 graphics
|
||||
TrapC(true); \prevent Ctrl+C from aborting the program
|
||||
Attrib($70); \set black-on-gray color attribute
|
||||
SetWind(0+X0, 0+Y0, 35+X0, 8+Y0, 0, \fill\true); \draw gray rectangle
|
||||
Cursor(33+X0, 0+Y0); Text(6, "X"); \draw exit button
|
||||
Attrib($9F); \set bright white on light blue, for title bar
|
||||
Cursor(0+X0, 0+Y0); Text(6, " Window creation ");
|
||||
|
||||
ShowMouse(true);
|
||||
ShowMouse(true); \turn on mouse pointer
|
||||
loop [MoveMouse; \make pointer track mouse movements
|
||||
Mouse:= GetMouse;
|
||||
Mouse:= GetMouse; \get pointer to mouse array information
|
||||
if Mouse(2) then \a left or right mouse button is down
|
||||
[Button:= GetButton; \get soft button at mouse pointer
|
||||
while Mouse(2) do \wait for mouse button's release
|
||||
while Mouse(2) do \wait for mouse button(s) to be released
|
||||
[MoveMouse;
|
||||
Mouse:= GetMouse;
|
||||
];
|
||||
if Button = GetButton then \if down Button = release button
|
||||
if Button = 0 then quit;
|
||||
];
|
||||
if KeyHit then
|
||||
[C:= ChIn(1); \get character from non-echoed keyboard
|
||||
if C = \Esc\$1B then quit;
|
||||
if Button = GetButton then \if down Button = release button and it
|
||||
if Button = 0 then quit; \is the exit [X] button then quit loop
|
||||
];
|
||||
if KeyHit then \get character from non-echoed keyboard
|
||||
if ChIn(1) = \Esc\$1B then quit; \Esc key also exits program
|
||||
];
|
||||
SetVid(3); \restore normal text mode immediately
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue