summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2011-11-23 16:35:34 +0100
committerJonathan Bauer2011-11-23 16:35:34 +0100
commit85cacb783e00190d4d8ae68ea0c1fa5f804185f0 (patch)
treea398275bfc49826c3e79d1ac2cc9bdfdd7b98761
parentMerge branch 'master' of openslx.org:openslx/core (diff)
downloadcore-85cacb783e00190d4d8ae68ea0c1fa5f804185f0.tar.gz
core-85cacb783e00190d4d8ae68ea0c1fa5f804185f0.tar.xz
core-85cacb783e00190d4d8ae68ea0c1fa5f804185f0.zip
progress bar replaced with moving dot
-rw-r--r--src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/progress_bar.pngbin173 -> 0 bytes
-rw-r--r--src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/progress_box.pngbin196 -> 0 bytes
-rw-r--r--src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/unifr-rz.script108
-rw-r--r--src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/white_dot_small.pngbin0 -> 376 bytes
4 files changed, 91 insertions, 17 deletions
diff --git a/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/progress_bar.png b/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/progress_bar.png
deleted file mode 100644
index dd1e747a..00000000
--- a/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/progress_bar.png
+++ /dev/null
Binary files differ
diff --git a/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/progress_box.png b/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/progress_box.png
deleted file mode 100644
index c485cfbc..00000000
--- a/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/progress_box.png
+++ /dev/null
Binary files differ
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
index 00b6970a..03732411 100644
--- 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
@@ -9,29 +9,103 @@ screen_width = Window.GetWidth();
title_right_sprite.SetX(screen_width - title_right_image.GetWidth());
-#----------------------------------------- Progress Bar --------------------------------
+dot.image = Image("white_dot_small.png");
+dot.sprite1 = Sprite(dot.image);
+dot.sprite2 = Sprite(dot.image);
+dot.sprite3 = Sprite(dot.image);
+dot.sprite4 = Sprite(dot.image);
+dot.sprite5 = Sprite(dot.image);
-progress_box.image = Image("progress_box.png");
-progress_box.sprite = Sprite(progress_box.image);
+#----------------------------------------- Progress Dots --------------------------------
-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);
+dot.x = Window.GetWidth() / 3;
+dot.y = Window.GetHeight() * 0.75 - dot.image.GetHeight() / 2;
-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);
+dot.sprite1.SetPosition(dot.x, dot.y, 1);
+dot.sprite1.SetOpacity(0.1);
+dot.sprite2.SetPosition( ( Window.GetWidth() / 3 ) * 1.2 , dot.y, 1);
+dot.sprite2.SetOpacity(0.1);
+dot.sprite3.SetPosition( ( Window.GetWidth() / 3 ) * 1.4 , dot.y, 1);
+dot.sprite3.SetOpacity(0.1);
+dot.sprite4.SetPosition( ( Window.GetWidth() / 3 ) * 1.6 , dot.y, 1);
+dot.sprite4.SetOpacity(0.1);
+dot.sprite5.SetPosition( ( Window.GetWidth() / 3 ) * 1.8 , dot.y, 1);
+dot.sprite5.SetOpacity(0.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);
- }
+ if ( Math.Int(duration * 2) % 10 == 1 )
+ {
+ fade_out(dot.sprite5);
+ fade_in(dot.sprite1);
+ }
+
+ if ( Math.Int(duration * 2) % 10 == 2 )
+ {
+ fade_out(dot.sprite1);
+ fade_in(dot.sprite2);
+ }
+
+ if ( Math.Int(duration * 2) % 10 == 3 )
+ {
+ fade_out(dot.sprite2);
+ fade_in(dot.sprite3);
+ }
+
+ if ( Math.Int(duration * 2) % 10 == 4 )
+ {
+ fade_out(dot.sprite3);
+ fade_in(dot.sprite4);
+ }
+
+ if ( Math.Int(duration * 2) % 10 == 5 )
+ {
+ fade_out(dot.sprite4);
+ fade_in(dot.sprite5);
+ }
+
+ if ( Math.Int(duration * 2) % 10 == 6 )
+ {
+ fade_out(dot.sprite5);
+ fade_in(dot.sprite1);
+ }
+
+ if ( Math.Int(duration * 2) % 10 == 7 )
+ {
+ fade_out(dot.sprite1);
+ fade_in(dot.sprite2);
+ }
+
+ if ( Math.Int(duration * 2) % 10 == 8 )
+ {
+ fade_out(dot.sprite2);
+ fade_in(dot.sprite3);
+ }
+
+ if ( Math.Int(duration * 2) % 10 == 9 )
+ {
+ fade_out(dot.sprite3);
+ fade_in(dot.sprite4);
+ }
+
+ if ( Math.Int(duration * 2) % 10 == 0 )
+ {
+ fade_out(dot.sprite4);
+ if ( Math.Int(duration) > 0 )
+ { fade_in(dot.sprite5); }
+ }
}
+fun fade_in(sprite)
+{
+ if ( sprite.GetOpacity() + 0.1 < 1 )
+ { sprite.SetOpacity(sprite.GetOpacity() + 0.1);}
+}
+
+fun fade_out(sprite)
+{
+ if ( sprite.GetOpacity() - 0.1 > 0.1 )
+ { sprite.SetOpacity(sprite.GetOpacity() - 0.1);}
+}
+
Plymouth.SetBootProgressFunction(progress_callback);
diff --git a/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/white_dot_small.png b/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/white_dot_small.png
new file mode 100644
index 00000000..4fd4be30
--- /dev/null
+++ b/src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/white_dot_small.png
Binary files differ