View Single Post
Old 12-20-2018, 11:33 PM   #15
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Hmm...I think there are two more options. One, you add such an image-class yourself. Afaik, lokasenna did the class-concept for that purpose to make enhancing easier. But I never looked into it, so I can't help you with that(lokasenna, where ar thou?)

The other option is one, I use for the winterly snowflakes-function in my API, replacing the gfx.update()-function.

1. Copy gfx.update into a variable, like oldgfxupd=gfx.update
2. Write a new one, that blits the image and run oldgfxupd()
3. Before blitting, store the old values of gfx.x and gfx.y and restore them after blitting the image.

The function declaration is, as you are used to:
function gfx.update()

...Your blitting code here...

oldgfxupd()

end


The latter approach is more a hack that should work, but it may break with a future version of the gui-lib(though it's not likely to break).
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote