plymouth-themes/pack_1/alienware/alienware.script

27 lines
718 B
Plaintext
Raw Normal View History

2020-03-26 15:50:48 +05:30
## 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 < 24; i++)
flyingman_image[i] = Image("progress-" + i + ".png");
flyingman_sprite = Sprite();
# set image position
flyingman_sprite.SetX(Window.GetWidth() / 2 - flyingman_image[0].GetWidth() / 2); # Place images in the center
flyingman_sprite.SetY(Window.GetHeight() / 2 - flyingman_image[0].GetHeight() / 2);
progress = 0;
fun refresh_callback ()
{
flyingman_sprite.SetImage(flyingman_image[Math.Int(progress / 3) % 24]);
progress++;
}
Plymouth.SetRefreshFunction (refresh_callback);