Annotation of /trunk/plymouth-theme-alx/alx.script
Parent Directory | Revision Log
Revision 1881 -
(hide annotations)
(download)
Tue Jul 31 08:11:44 2012 UTC (12 years, 3 months ago) by niro
File size: 1677 byte(s)
Tue Jul 31 08:11:44 2012 UTC (12 years, 3 months ago) by niro
File size: 1677 byte(s)
-added first plymouth alx theme
1 | niro | 1881 | # ALX Thinclient plymouth theme script |
2 | |||
3 | wallpaper.original_image = Image("alx.png"); | ||
4 | wallpaper.image = wallpaper.original_image.Scale(Window.GetWidth(), Window.GetHeight()); | ||
5 | wallpaper.sprite = Sprite(wallpaper.image); | ||
6 | wallpaper.sprite.SetZ(-100); | ||
7 | |||
8 | #progress_box.original_image = Image("progress_box.png"); | ||
9 | #progress_box.image = progress_box.original_image.Scale(Window.GetWidth(), Window.GetHeight()); | ||
10 | progress_box.image = Image("progress_box.png"); | ||
11 | progress_box.sprite = Sprite(progress_box.image); | ||
12 | |||
13 | progress_box.x = Window.GetX() + Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2; | ||
14 | progress_box.y = Window.GetY() + Window.GetHeight() * 0.75 - progress_box.image.GetHeight() / 2; | ||
15 | progress_box.sprite.SetPosition(progress_box.x, progress_box.y, 0); | ||
16 | |||
17 | progress_bar.original_image = Image("progress_bar.png"); | ||
18 | progress_bar.sprite = Sprite(); | ||
19 | |||
20 | progress_bar.x = Window.GetX() + Window.GetWidth() / 2 - progress_bar.original_image.GetWidth() / 2; | ||
21 | progress_bar.y = Window.GetY() + Window.GetHeight() / 2 * 1.5 - progress_box.image.GetHeight() / 8 + (progress_box.image.GetHeight() - progress_bar.original_image.GetHeight()) / 2; | ||
22 | progress_bar.sprite.SetPosition(progress_bar.x, progress_bar.y, 1); | ||
23 | |||
24 | fun progress_callback (duration, progress) | ||
25 | { | ||
26 | if (progress_bar.image.GetWidth () != Math.Int (progress_bar.original.image.GetWidth () * progress)) | ||
27 | { | ||
28 | progress_bar.image = progress_bar.original_image.Scale(progress_bar.original_image.GetWidth(progress_bar.original_image) * progress, progress_bar.original_image.GetHeight()); | ||
29 | progress_bar.sprite.SetImage (progress_bar.image); | ||
30 | } | ||
31 | } | ||
32 | |||
33 | Plymouth.SetBootProgressFunction(progress_callback); |