@@ -0,0 +1,8 @@
|
||||
[Plymouth Theme]
|
||||
Name=WESP
|
||||
Description=WESP boot splash (800x600 pixel logo animation)
|
||||
ModuleName=script
|
||||
|
||||
[script]
|
||||
ImageDir=/usr/share/plymouth/themes/wesp
|
||||
ScriptFile=/usr/share/plymouth/themes/wesp/wesp.script
|
||||
@@ -0,0 +1,44 @@
|
||||
# WESP Plymouth theme — полноэкранная анимация 800×600 (кадры animation/N.png)
|
||||
|
||||
screen.width = Window.GetWidth();
|
||||
screen.height = Window.GetHeight();
|
||||
|
||||
# Тёмный фон (#0f1114), как data-theme="dark"
|
||||
Window.SetBackgroundTopColor(0.0588, 0.0667, 0.0784);
|
||||
Window.SetBackgroundBottomColor(0.0588, 0.0667, 0.0784);
|
||||
|
||||
animation.length = 0;
|
||||
animation.images = [];
|
||||
|
||||
while (1) {
|
||||
local.path = "animation/" + animation.length + ".png";
|
||||
local.frame = Image(local.path);
|
||||
if (!frame)
|
||||
break;
|
||||
animation.images[animation.length++] = frame;
|
||||
}
|
||||
|
||||
animation.current_frame = 0;
|
||||
animation.sprite = Sprite();
|
||||
|
||||
fun refresh_callback() {
|
||||
if (animation.length == 0)
|
||||
return;
|
||||
|
||||
local.frame = animation.images[animation.current_frame];
|
||||
animation.sprite.SetImage(frame);
|
||||
|
||||
# Кадры 800×600 — на других разрешениях центрируем
|
||||
animation.sprite.SetX((screen.width - frame.GetWidth()) / 2);
|
||||
animation.sprite.SetY((screen.height - frame.GetHeight()) / 2);
|
||||
|
||||
animation.current_frame++;
|
||||
if (animation.current_frame >= animation.length)
|
||||
animation.current_frame = 0;
|
||||
}
|
||||
|
||||
Plymouth.SetRefreshFunction(refresh_callback);
|
||||
|
||||
fun quit_callback() {}
|
||||
|
||||
Plymouth.SetQuitFunction(quit_callback);
|
||||
Reference in New Issue
Block a user