#the goal here is to play a gif or other
1 messages ยท Page 1 of 1 (latest)
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
imagessubdirectory - 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
continueto 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
@crimson night uhhhhh
aHA, and what is that error ?
maybe an image that is not 64x64 or a multiple of that ?
ill pull up the serial monitor
ah that is it
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
we can special case it
how do we do this
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
ok
that should work
how do we do it though
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 ?
well ya
i was just trying to keep it all simple
yeah it would make it more complicated ๐
thanks :)
That's an awesome addition. I'm going to use it on mine! ๐