summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Bauer2011-11-25 15:57:33 +0100
committerJonathan Bauer2011-11-25 15:57:33 +0100
commit2251377e9d076024321863276e5fbf39f785060b (patch)
tree0e758636ffe89cd67994cb23013a233d1b36e221 /src
parentprogress bar replaced with moving dot (diff)
downloadcore-2251377e9d076024321863276e5fbf39f785060b.tar.gz
core-2251377e9d076024321863276e5fbf39f785060b.tar.xz
core-2251377e9d076024321863276e5fbf39f785060b.zip
plymouth plugin: dots centered
Diffstat (limited to 'src')
-rw-r--r--src/os-plugins/plugins/plymouth/files/lib/plymouth/themes/unifr-rz/unifr-rz.script41
1 files changed, 23 insertions, 18 deletions
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 03732411..f2d8bd28 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
@@ -5,9 +5,8 @@ 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());
+title_right_sprite.SetX(Window.GetWidth() - title_right_image.GetWidth());
dot.image = Image("white_dot_small.png");
dot.sprite1 = Sprite(dot.image);
@@ -18,77 +17,83 @@ dot.sprite5 = Sprite(dot.image);
#----------------------------------------- Progress Dots --------------------------------
-dot.x = Window.GetWidth() / 3;
+dot.x = Window.GetWidth() / 2 - dot.image.GetWidth() / 2;
dot.y = Window.GetHeight() * 0.75 - dot.image.GetHeight() / 2;
+dot.spacing = Window.GetWidth() / 15;
-dot.sprite1.SetPosition(dot.x, dot.y, 1);
+# place 5 centered dots
+dot.sprite1.SetPosition(dot.x - 2 * dot.spacing, dot.y, 1);
+dot.sprite2.SetPosition(dot.x - dot.spacing, dot.y, 1);
+dot.sprite3.SetPosition(dot.x, dot.y, 1);
+dot.sprite4.SetPosition(dot.x + dot.spacing, dot.y, 1);
+dot.sprite5.SetPosition(dot.x + 2 * dot.spacing, dot.y, 1);
+
+# set opacity
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 ( Math.Int(duration * 2) % 10 == 1 )
+ phase = Math.Int(duration * 2) % 10;
+
+ if ( phase == 1 )
{
fade_out(dot.sprite5);
fade_in(dot.sprite1);
}
- if ( Math.Int(duration * 2) % 10 == 2 )
+ if ( phase == 2 )
{
fade_out(dot.sprite1);
fade_in(dot.sprite2);
}
- if ( Math.Int(duration * 2) % 10 == 3 )
+ if ( phase == 3 )
{
fade_out(dot.sprite2);
fade_in(dot.sprite3);
}
- if ( Math.Int(duration * 2) % 10 == 4 )
+ if ( phase == 4 )
{
fade_out(dot.sprite3);
fade_in(dot.sprite4);
}
- if ( Math.Int(duration * 2) % 10 == 5 )
+ if ( phase == 5 )
{
fade_out(dot.sprite4);
fade_in(dot.sprite5);
}
- if ( Math.Int(duration * 2) % 10 == 6 )
+ if ( phase == 6 )
{
fade_out(dot.sprite5);
fade_in(dot.sprite1);
}
- if ( Math.Int(duration * 2) % 10 == 7 )
+ if ( phase == 7 )
{
fade_out(dot.sprite1);
fade_in(dot.sprite2);
}
- if ( Math.Int(duration * 2) % 10 == 8 )
+ if ( phase == 8 )
{
fade_out(dot.sprite2);
fade_in(dot.sprite3);
}
- if ( Math.Int(duration * 2) % 10 == 9 )
+ if ( phase == 9 )
{
fade_out(dot.sprite3);
fade_in(dot.sprite4);
}
- if ( Math.Int(duration * 2) % 10 == 0 )
+ if ( phase == 0 )
{
fade_out(dot.sprite4);
if ( Math.Int(duration) > 0 )