plymouth-themes/pack_1/abstract_ring/abstract_ring.script

27 lines
752 B
Text
Raw Normal View History

2020-03-26 11:20:48 +01:00
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
# set background colors
Window.SetBackgroundColor (000000);
# cycle through all images
for (i = 0; i < 41; i++)
flyingman_image[i] = Image("progress-" + i + ".png");
flyingman_sprite = Sprite();
# set image position
2020-03-28 00:49:53 +01:00
flyingman_sprite.SetX(Window.GetX() + (Window.GetWidth() / 2 - flyingman_image[0].GetWidth() / 2)); # Place images in the center
flyingman_sprite.SetY(Window.GetY() + (Window.GetHeight() / 2 - flyingman_image[0].GetHeight() / 2));
2020-03-26 11:20:48 +01:00
progress = 0;
fun refresh_callback ()
{
flyingman_sprite.SetImage(flyingman_image[Math.Int(progress / 2) % 41]);
progress++;
}
2020-03-28 00:49:53 +01:00
2020-03-26 11:20:48 +01:00
Plymouth.SetRefreshFunction (refresh_callback);