long ago developing a login with an animated image.
I had the problem that according to the resolution the image was not scaled.
So I decided to modify the function for better use.
As it is something really simple I share it for everyone.
I hope someone finds it useful.
Bitte melden Sie sich an, um diesen Link zu sehen.
Bitte melden Sie sich an, um diesen Anhang zu sehen.
Python
- {
- "name" : "bg1",
- "type" : "ani_image",
- "x" : 0,
- "y" : 0,
- "width" : SCREEN_WIDTH,
- "height" : SCREEN_HEIGHT,
- "x_scale" : float(SCREEN_WIDTH) / 1280.0, "y_scale" : float(SCREEN_HEIGHT) / 720.0,
- "delay" : 6,
- "images" :
- (
- "D:/Ymir Work/UI/gifs/1.jpg",
- "D:/Ymir Work/UI/gifs/2.jpg",
- "D:/Ymir Work/UI/gifs/3.jpg",
- "D:/Ymir Work/UI/gifs/4.jpg",
- "D:/Ymir Work/UI/gifs/5.jpg",
- "D:/Ymir Work/UI/gifs/6.jpg",
- "D:/Ymir Work/UI/gifs/7.jpg",
- "D:/Ymir Work/UI/gifs/8.jpg",
- "D:/Ymir Work/UI/gifs/9.jpg",
- "D:/Ymir Work/UI/gifs/10.jpg",
- "D:/Ymir Work/UI/gifs/11.jpg",
- "D:/Ymir Work/UI/gifs/12.jpg",
- "D:/Ymir Work/UI/gifs/13.jpg",
- "D:/Ymir Work/UI/gifs/14.jpg",
- "D:/Ymir Work/UI/gifs/15.jpg",
- "D:/Ymir Work/UI/gifs/16.jpg",
- ),
- },
Note:
If you want a better way, I think that many in this community can do it.
This is not a contribution for any developer but for a person who is starting and not be scammed by some people.