Anonymous user
Colour pinstripe/Display: Difference between revisions
→{{header|M2000 Interpreter}}
Line 635:
Sprite layers have a priority number, so 32 is the top one. We can change priorities sending back any sprite.
Version 2
We change console width and height and put in the center of screen
We use a thread to move the layer above console (and inside console form), when we push any mouse button (only in console window). Program ends when we close the modal opened window.
<lang M2000 Interpreter>
Module
Smooth off ' use of GDI32
Colors(0)=#000000,#FF0000, #00FF00, #0000FF, #FF00FF, #00FFFF, #FFFF00, #FFFFFF▼
Dim colors(0 to 7)
▲ Colors(0)=#000000,#FF0000, #00FF00, #0000FF, #FF00FF, #00FFFF, #FFFF00, #FFFFFF
pixelsY=scale.y/twipsY▼
Refresh 5000▼
Step 0, -zoneheight
n++:if n=8 then n=0
}
}
\\ now we make the refersh
}
\\
\\ now we make a window and draw there▼
Refresh 100▼
▲\\ now we make a window and draw there
Pinstripe▼
Layer 32 {▼
Window 12, 10000,10000▼
Pinstripe
▲ Window 12, 10000,10000
Show▼
▲ Pinstripe
▲ Show
}
Declare Pinstripe Form▼
Layer Pinstripe {▼
Window 12, 10000,10000▼
Pinstripe▼
motion 2000, 2000
}
Thread {
if control$="MAIN" then if mouse then player 32, mousea.x, mousea.y
} as anyvar interval 100
Method Pinstripe, "Show", 1▼
Threads Erase
▲ Layer 32 {Hide}
Cls
}
Checkit
▲Declare Pinstripe Form
▲Layer Pinstripe {
▲ Window 12, 10000,10000
▲ Pinstripe
▲Method Pinstripe, "Show", 1
</lang>
|