-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopsbyte-plymouth.script
More file actions
129 lines (102 loc) · 3.96 KB
/
opsbyte-plymouth.script
File metadata and controls
129 lines (102 loc) · 3.96 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
Window.SetBackgroundTopColor (0, 0, 0);
Window.SetBackgroundBottomColor (0, 0, 0);
bg_image = Image ("bg.png");
bg_image = bg_image.Scale (Window.GetWidth (),Window.GetHeight ());
bg = Sprite (bg_image);
bg.SetZ (-10);
yPos = (2/5);
if (Plymouth.GetMode () == "shutdown")
{
yPos = 0.5;
}
s = 0.75;
logo_image = Image ("logo.png");
logo_image = logo_image.Scale (120 * s , 120 * s);
logo = Sprite (logo_image);
logo.SetX (Window.GetWidth () / 2 - logo_image.GetWidth() / 2);
logo.SetY ((Window.GetHeight() * yPos) - logo_image.GetHeight() / 2);
istatic = Image ("static.png");
istatic = istatic.Scale (istatic.GetWidth() * s * 0.3 ,istatic.GetHeight() * s * 0.3 );
static = Sprite (istatic);
static.SetX (Window.GetWidth () / 2 - istatic.GetWidth() / 2);
static.SetY ((Window.GetHeight() * yPos) - istatic.GetHeight() / 2);
ic1 = Image ("1.png");
ic1 = ic1.Scale (ic1.GetWidth() * s ,ic1.GetHeight() * s );
c1 = Sprite (ic1);
c1.SetX (Window.GetWidth () / 2 - ic1.GetWidth() / 2);
c1.SetY ((Window.GetHeight() * yPos) - ic1.GetHeight() / 2);
ic2 = Image ("2.png");
ic2 = ic2.Scale (ic2.GetWidth() * s ,ic2.GetHeight() * s );
c2 = Sprite (ic2);
c2.SetX (Window.GetWidth () / 2 - ic2.GetWidth() / 2);
c2.SetY ((Window.GetHeight() * yPos) - ic2.GetHeight() / 2);
ic3 = Image ("3.png");
ic3 = ic3.Scale (ic3.GetWidth() * s ,ic3.GetHeight() * s );
c3 = Sprite (ic3);
c3.SetX (Window.GetWidth () / 2 - ic3.GetWidth() / 2);
c3.SetY ((Window.GetHeight() * yPos) - ic3.GetHeight() / 2);
ic4 = Image ("4.png");
ic4 = ic4.Scale (ic4.GetWidth() * s ,ic4.GetHeight() * s );
c4 = Sprite (ic4);
c4.SetX (Window.GetWidth () / 2 - ic4.GetWidth() / 2);
c4.SetY ((Window.GetHeight() * yPos) - ic4.GetHeight() / 2);
ic5 = Image ("5.png");
ic5 = ic5.Scale (ic5.GetWidth() * s ,ic5.GetHeight() * s );
c5 = Sprite (ic5);
c5.SetX (Window.GetWidth () / 2 - ic5.GetWidth() / 2);
c5.SetY ((Window.GetHeight() * yPos) - ic5.GetHeight() / 2);
ic6 = Image ("6.png");
ic6 = ic6.Scale (ic6.GetWidth() * s ,ic6.GetHeight() * s );
c6 = Sprite (ic6);
c6.SetX (Window.GetWidth () / 2 - ic6.GetWidth() / 2);
c6.SetY ((Window.GetHeight() * yPos) - ic6.GetHeight() / 2);
ic7 = Image ("7.png");
ic7 = ic7.Scale (ic7.GetWidth() * s ,ic7.GetHeight() * s );
c7 = Sprite (ic7);
c7.SetX (Window.GetWidth () / 2 - ic7.GetWidth() / 2);
c7.SetY ((Window.GetHeight() * yPos) - ic7.GetHeight() / 2);
ic8 = Image ("8.png");
ic8 = ic8.Scale (ic8.GetWidth() * s ,ic8.GetHeight() * s );
c8 = Sprite (ic8);
c8.SetX (Window.GetWidth () / 2 - ic8.GetWidth() / 2);
c8.SetY ((Window.GetHeight() * yPos) - ic8.GetHeight() / 2);
ic9 = Image ("9.png");
ic9 = ic9.Scale (ic9.GetWidth() * s ,ic9.GetHeight() * s );
c9 = Sprite (ic9);
c9.SetX (Window.GetWidth () / 2 - ic9.GetWidth() / 2);
c9.SetY ((Window.GetHeight() * yPos) - ic9.GetHeight() / 2);
ic10 = Image ("10.png");
ic10 = ic10.Scale (ic10.GetWidth() * s ,ic10.GetHeight() * s );
c10 = Sprite (ic10);
c10.SetX (Window.GetWidth () / 2 - ic10.GetWidth() / 2);
c10.SetY ((Window.GetHeight() * yPos) - ic10.GetHeight() / 2);
t=0;
fun update ()
{
t++;
c1.SetImage(ic1.Rotate(t * 0.009));
c2.SetImage(ic2.Rotate(t * 0.007));
c3.SetImage(ic3.Rotate(t * 0.006));
c4.SetImage(ic4.Rotate(t * 0.0053));
c5.SetImage(ic5.Rotate(t * 0.0048));
c6.SetImage(ic6.Rotate(t * 0.004));
c7.SetImage(ic7.Rotate(t * 0.0035));
c8.SetImage(ic8.Rotate(t * 0.003));
c9.SetImage(ic9.Rotate(t * 0.0025));
c10.SetImage(ic10.Rotate(t * 0.002));
}
Plymouth.SetRefreshFunction (update);
#----------------------------------------- Progress Bar --------------------------------
if (Plymouth.GetMode () == "boot")
{
ipb = Image ("pb.png");
pb = ipb.Scale (1 , 3);
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 * 100, 3));
}
Plymouth.SetBootProgressFunction(progress_callback);
}