-
Notifications
You must be signed in to change notification settings - Fork 0
/
PrismOS-Boot.script
38 lines (33 loc) · 1.14 KB
/
PrismOS-Boot.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Window.SetBackgroundTopColor (0, 0, 0);
Window.SetBackgroundBottomColor (0, 0, 0);
bg_image = Image ("Background.png");
bg_image = bg_image.Scale (Window.GetWidth ()+100,Window.GetHeight ()+100);
bg = Sprite (bg_image);
bg.SetZ (-10);
bg.SetX (Window.GetWidth () / 2 - bg.GetImage().GetWidth() / 2);
bg.SetY (Window.GetHeight () / 2 - bg.GetImage().GetHeight() / 2);
index = 1;
fun update ()
{
}
Plymouth.SetRefreshFunction (update);
if (Plymouth.GetMode () == "boot"){
ipb = Image ("Black Progress Bar.png");
pb = ipb.Scale (Window.GetWidth ()/ 3.03, Window.GetHeight() /24);
pb = Sprite (ipb);
pb.SetX (Window.GetWidth () / 2 - 50);
pb.SetY ((Window.GetHeight() * (2/3)) - ipb.GetHeight() / 2);
fun progress_callback (duration, progress)
{
pb.SetImage(ipb.Scale ( progress * 1000, Window.GetHeight() /24));
}
Plymouth.SetBootProgressFunction(progress_callback);
}else if (Plymouth.GetMode () == "shutdown"){
#ShowSuspendBackground();
}else if (Plymouth.GetMode () == "suspend"){
#ShowSuspendBackground();
}else if (Plymouth.GetMode () == "resume"){
#ShowSuspendBackground();
}else{
#ShowSuspendBackground();
}