Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
26
Task/Animation/M2000-Interpreter/animation-1.m2000
Normal file
26
Task/Animation/M2000-Interpreter/animation-1.m2000
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
Module UseBlink {
|
||||
Def boolean direction=True
|
||||
rotating$ =lambda$ a$="Hello World! " (direction as boolean)->{
|
||||
=a$
|
||||
a$=if$(direction->right$(a$,1)+mid$(a$,1, len(a$)-1), mid$(a$,2)+left$(a$,1))
|
||||
}
|
||||
Declare MyForm Form
|
||||
Declare MyButton Button Form MyForm
|
||||
With MyButton, "Caption" as MyButtonCaption$, "Blink", 200
|
||||
Method MyForm,"Move", 1000,1000,6000,4000
|
||||
Method MyButton,"Move", 1000,1700,4000,600
|
||||
Function MyButton.Blink {
|
||||
Rem Stack : Refresh ' to refresh the console window
|
||||
MyButtonCaption$=rotating$(direction)
|
||||
}
|
||||
Function MyButton.Click {
|
||||
direction~
|
||||
}
|
||||
Function MyForm.Click {
|
||||
direction~
|
||||
}
|
||||
With MyForm, "Title", "Animation"
|
||||
Method MyForm, "Show", 1
|
||||
Threads Erase
|
||||
}
|
||||
UseBlink
|
||||
16
Task/Animation/M2000-Interpreter/animation-2.m2000
Normal file
16
Task/Animation/M2000-Interpreter/animation-2.m2000
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Module UseEvery {
|
||||
Window 16, 6000,4000;
|
||||
Print "Animation"
|
||||
Def boolean direction=True
|
||||
rotating$ =lambda$ a$="Hello World! " (direction as boolean)->{
|
||||
=a$
|
||||
a$=if$(direction->right$(a$,1)+mid$(a$,1, len(a$)-1), mid$(a$,2)+left$(a$,1))
|
||||
}
|
||||
Every 200 {
|
||||
Cls #225577,1
|
||||
Print @(2,height/2),rotating$(direction)
|
||||
if mouse=1 then direction~
|
||||
if mouse=2 then exit
|
||||
}
|
||||
}
|
||||
UseEvery
|
||||
23
Task/Animation/M2000-Interpreter/animation-3.m2000
Normal file
23
Task/Animation/M2000-Interpreter/animation-3.m2000
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
Module UseThread {
|
||||
Def boolean direction=True
|
||||
rotating$ =lambda$ a$="Hello World! " (direction as boolean)->{
|
||||
=a$
|
||||
a$=if$(direction->right$(a$,1)+mid$(a$,1, len(a$)-1), mid$(a$,2)+left$(a$,1))
|
||||
}
|
||||
Declare MyForm Form
|
||||
Layer MyForm {
|
||||
Thread {
|
||||
Cls #225577,0
|
||||
Print @(2,height/2),rotating$(direction)
|
||||
} as M interval 200
|
||||
}
|
||||
Function MyForm.Click {
|
||||
direction~
|
||||
}
|
||||
|
||||
With MyForm, "Title", "Animation"
|
||||
|
||||
Method MyForm, "Show", 1
|
||||
Threads Erase
|
||||
}
|
||||
UseThread
|
||||
Loading…
Add table
Add a link
Reference in a new issue