You can do this using the standard DBPro commands (with a small restriction):
sync on
` Create a sprite to move with the mouse()
ink rgb(255,0,0), 0
box 0, 0, 64, 64
get image 1, 0, 0, 64, 64, 1
sprite 1, 320, 240, 1
offset sprite 1, 32, 32
ink rgb(255,255,255),0
DRAW SPRITES FIRST
do
sprite 1, mousex(), mousey(), 1
center text screen width()/2, screen height()/2, "This text will appear in front of the sprite"
sync
loop
The restriction is that you have to let the sprites clear the screen (something that people usually switch off, using CLS instead), and everything appears on top of the sprites.
Another alternative which is more flexible, is to use 2 of my plug-in commands to tell DBPro exactly when to draw the sprites:
sync on
` Create a sprite to move with the mouse()
ink rgb(255,0,0), 0
box 0, 0, 64, 64
get image 1, 0, 0, 64, 64, 1
sprite 1, 320, 240, 1
offset sprite 1, 32, 32
ink rgb(255,255,255),0
DRAW SPRITES MANUAL ` <==== Here we tell DBPro we're going to draw the sprites ourselves
do
sprite 1, mousex(), mousey(), 1
center text screen width()/2, screen height()/2-20, "This text will appear behind the sprite"
DRAW SPRITES ` <==== and this is where we draw them
center text screen width()/2, screen height()/2, "This text will appear in front of the sprite"
sync
loop