From 401a104803e9743eb62a9485779bfa8237694c46 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 18 Nov 2011 16:47:23 +0100 Subject: plymouth powered bootsplash plugin --- .../lib/plymouth/themes/unifr-rz/unifr-rz.script | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/unifr-rz.script (limited to 'src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/unifr-rz.script') diff --git a/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/unifr-rz.script b/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/unifr-rz.script new file mode 100644 index 00000000..00b6970a --- /dev/null +++ b/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/unifr-rz.script @@ -0,0 +1,37 @@ +Window.SetBackgroundTopColor(0.00, 0.21, 0.57); +#Window.SetBackgroundBottomColor(0.00, 0.17, 0.95); + +title_left_image = Image("rz_banner_trans.png"); +title_right_image = Image("rz_logo_trans.png"); +title_left_sprite = Sprite(title_left_image); +title_right_sprite = Sprite(title_right_image); +screen_width = Window.GetWidth(); + +title_right_sprite.SetX(screen_width - title_right_image.GetWidth()); + +#----------------------------------------- Progress Bar -------------------------------- + +progress_box.image = Image("progress_box.png"); +progress_box.sprite = Sprite(progress_box.image); + +progress_box.x = Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2; +progress_box.y = Window.GetHeight() * 0.75 - progress_box.image.GetHeight() / 2; +progress_box.sprite.SetPosition(progress_box.x, progress_box.y, 0); + +progress_bar.original_image = Image("progress_bar.png"); +progress_bar.sprite = Sprite(); + +progress_bar.x = Window.GetWidth() / 2 - progress_bar.original_image.GetWidth() / 2; +progress_bar.y = Window.GetHeight() / 2 * 1.5 - progress_box.image.GetHeight() / 2 + (progress_box.image.GetHeight() - progress_bar.original_image.GetHeight()) / 2; +progress_bar.sprite.SetPosition(progress_bar.x, progress_bar.y, 1); + +fun progress_callback (duration, progress) + { + if (progress_bar.image.GetWidth () != Math.Int (progress_bar.original_image.GetWidth () * progress)) + { + progress_bar.image = progress_bar.original_image.Scale(progress_bar.original_image.GetWidth(progress_bar.original_image) * progress, progress_bar.original_image.GetHeight()); + progress_bar.sprite.SetImage (progress_bar.image); + } + } + +Plymouth.SetBootProgressFunction(progress_callback); -- cgit v1.2.3-55-g7522