#the goal here is to play a gif or other

1 messages ยท Page 1 of 1 (latest)

crimson night
#

Here is a version that loads an image, animates it if it is a spritesheet

  • all icons must be 64x64
  • or a spritesheet that is mutiple lines or columns of 64 (64x256 would be 4 frames)
  • all images are in the images subdirectory
  • I use the adjoined bmp spritesheet as default (it's a rotating play icon)
#

a few more notes:

  • ICON_DURATION is how long the icon is displayed or animated
  • FRAME_DURATION is the minimum duration of a frame, it can't probably do very fast (I definitely set it to a valu it can't do)
  • if the animation is interrupted by moving the encoder, it uses continue to skip the loop and display the next icon
  • there is no obvious indication that you switched between menus that don't have an icon, so maybe we could add a flash or short black screen before showing each image
serene nest
crimson night
#

aHA, and what is that error ?

#

maybe an image that is not 64x64 or a multiple of that ?

serene nest
serene nest
#

also

#

is there any way that the sprite sheet i play

#

could it be a different resolution

#

i want to play this as the default

#

sprite sheet

crimson night
#

we can special case it

serene nest
crimson night
#

though I think it would be easier to have a convention, what if we say that all images are 64 high, and spritesheets are vertical, we can then accomodate any width

serene nest
#

that should work

#

how do we do it though

crimson night
serene nest
#

thanks

#

time for github

crimson night
#

this version changes key colors first, by moving the call to display_image into App.switch() (and allows overwriting the icon file name in the app data)

#

also I was thinking you could name the images with the same name as the macro files instead of numbers ?

serene nest
#

i was just trying to keep it all simple

crimson night
#

yeah it would make it more complicated ๐Ÿ˜›

serene nest
#

thanks :)

meager hound
#

That's an awesome addition. I'm going to use it on mine! ๐Ÿ˜„