Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
32
Task/Mouse-position/M2000-Interpreter/mouse-position.m2000
Normal file
32
Task/Mouse-position/M2000-Interpreter/mouse-position.m2000
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
Module Checkit {
|
||||
\\ works when console is the active window
|
||||
\\ pressing right mouse button exit the loop
|
||||
While mouse<>2
|
||||
Print mouse.x, mouse.y
|
||||
End While
|
||||
\\ end of part one, now we make a form with title Form1 (same name as the variable name)
|
||||
Declare Form1 Form
|
||||
Layer Form1 {
|
||||
window 16, 10000,8000 ' 16pt font at maximum 10000 twips x 8000 twips
|
||||
cls #335522, 1 \\ from 2nd line start the split screen (for form's layer)
|
||||
pen 15 ' white
|
||||
}
|
||||
Function Form1.MouseMove {
|
||||
Read new button, shift, x, y ' we use new because call is local, same scope as Checkit.
|
||||
Layer Form1 {
|
||||
print x, y, button
|
||||
refresh
|
||||
}
|
||||
}
|
||||
Function Form1.MouseDown {
|
||||
Read new button, shift, x, y
|
||||
\\ when we press mouse button we print in console
|
||||
\\ but only the first time
|
||||
print x, y, button
|
||||
refresh
|
||||
}
|
||||
\\ open Form1 as modal window above console
|
||||
Method Form1, "Show", 1
|
||||
Declare Form1 Nothing
|
||||
}
|
||||
CheckIt
|
||||
Loading…
Add table
Add a link
Reference in a new issue