diff --git a/branding-mos-school/components/bootsplash/boot16x9.png b/branding-mos-school/components/bootsplash/boot16x9.png new file mode 100644 index 0000000..051f252 Binary files /dev/null and b/branding-mos-school/components/bootsplash/boot16x9.png differ diff --git a/branding-mos-school/components/bootsplash/boot4x3.png b/branding-mos-school/components/bootsplash/boot4x3.png new file mode 100644 index 0000000..7afb496 Binary files /dev/null and b/branding-mos-school/components/bootsplash/boot4x3.png differ diff --git a/branding-mos-school/components/bootsplash/box.png b/branding-mos-school/components/bootsplash/box.png old mode 100644 new mode 100755 diff --git a/branding-mos-school/components/bootsplash/bullet.png b/branding-mos-school/components/bootsplash/bullet.png index dd52736..a05ef26 100644 Binary files a/branding-mos-school/components/bootsplash/bullet.png and b/branding-mos-school/components/bootsplash/bullet.png differ diff --git a/branding-mos-school/components/bootsplash/bullet.svg b/branding-mos-school/components/bootsplash/bullet.svg new file mode 100644 index 0000000..38ef80e --- /dev/null +++ b/branding-mos-school/components/bootsplash/bullet.svg @@ -0,0 +1,49 @@ + + + + + + + + + + diff --git a/branding-mos-school/components/bootsplash/entry.png b/branding-mos-school/components/bootsplash/entry.png old mode 100644 new mode 100755 diff --git a/branding-mos-school/components/bootsplash/lock.png b/branding-mos-school/components/bootsplash/lock.png index a0f8c12..1838bae 100644 Binary files a/branding-mos-school/components/bootsplash/lock.png and b/branding-mos-school/components/bootsplash/lock.png differ diff --git a/branding-mos-school/components/bootsplash/lock.svg b/branding-mos-school/components/bootsplash/lock.svg new file mode 100644 index 0000000..9b2c65d --- /dev/null +++ b/branding-mos-school/components/bootsplash/lock.svg @@ -0,0 +1,53 @@ + + + + diff --git a/branding-mos-school/components/bootsplash/mos.plymouth b/branding-mos-school/components/bootsplash/mos.plymouth new file mode 100644 index 0000000..32b05e4 --- /dev/null +++ b/branding-mos-school/components/bootsplash/mos.plymouth @@ -0,0 +1,9 @@ +[Plymouth Theme] +Name=MOS +Description=MOS Plymouth theme. +ModuleName=script + +[script] +ImageDir=/usr/share/plymouth/themes/mos +ScriptFile=/usr/share/plymouth/themes/mos/mos.script +UseFirmwareBackground=false diff --git a/branding-mos-school/components/bootsplash/theme.script b/branding-mos-school/components/bootsplash/mos.script similarity index 56% rename from branding-mos-school/components/bootsplash/theme.script rename to branding-mos-school/components/bootsplash/mos.script index 08304d9..7607bce 100644 --- a/branding-mos-school/components/bootsplash/theme.script +++ b/branding-mos-school/components/bootsplash/mos.script @@ -1,32 +1,93 @@ -# Centaurus theme - -fun imgscale( image, scale ) +# background +fun imglogo( image, scaleX, scaleY ) { - image.Scale( image.GetWidth() * scale, image.GetHeight() * scale ); + image.Scale( image.GetWidth() * scaleX, image.GetHeight() * scaleY ); } -fun imgscale2( image, scaleX, scaleY ) +#----------------------------------------- Ptogress Bar __________________________ +#Boot +if (Plymouth.GetMode () == "boot") { - image.Scale( image.GetWidth() * scaleX, image.GetHeight() * scaleY ); + + # background + if( Window.GetWidth()/Window.GetHeight() > 1.5 ) + { + logo.raw = Image("boot16x9.png"); + } + else + { + logo.raw = Image("boot4x3.png"); + } + + logo.image = imglogo( logo.raw, Window.GetWidth()/logo.raw.GetWidth(), Window.GetHeight()/logo.raw.GetHeight()); + logo.sprite = Sprite(logo.image); + logo.sprite.SetPosition(0, 0, 0); + + progress_box.image = Image("progress_box.png"); + progress_box.sprite = Sprite(progress_box.image); + + progress_box.x = Window.GetX() + Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2; + #change here + progress_box.y = Window.GetY() + Window.GetHeight() * 0.65 - 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.GetX() + Window.GetWidth() / 2 - progress_bar.original_image.GetWidth() / 2; + #change here + progress_bar.y = Window.GetY() + Window.GetHeight() / 2 * 1.3 - 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); } -# background -if( Window.GetWidth()/Window.GetHeight() > 1.5 ) +if (Plymouth.GetMode () == "shutdown") { - logo.raw = Image("background16x9.png"); + +# background + if( Window.GetWidth()/Window.GetHeight() > 1.5 ) + { + logo.raw = Image("shutdown16x9.png"); + } + else + { + logo.raw = Image("shutdown4x3.png"); + } + + logo.image = imglogo( logo.raw, Window.GetWidth()/logo.raw.GetWidth(), Window.GetHeight()/logo.raw.GetHeight()); + logo.sprite = Sprite(logo.image); + logo.sprite.SetPosition(0, 0, 0); + } -else +if (Plymouth.GetMode () == "reboot") { - logo.raw = Image("background4x3.png"); -} -logo.image = imgscale2( logo.raw, - Window.GetWidth()/logo.raw.GetWidth(), - Window.GetHeight()/logo.raw.GetHeight()); -logo.sprite = Sprite(logo.image); -logo.sprite.SetPosition(0, 0, 0); +# background + if( Window.GetWidth()/Window.GetHeight() > 1.5 ) + { + logo.raw = Image("shutdown16x9.png"); + } + else + { + logo.raw = Image("shutdown4x3.png"); + } + + logo.image = imglogo( logo.raw, Window.GetWidth()/logo.raw.GetWidth(), Window.GetHeight()/logo.raw.GetHeight()); + logo.sprite = Sprite(logo.image); + logo.sprite.SetPosition(0, 0, 0); -#----------------------------------------- Dialogue -------------------------------- +} +#----------------------------------------- Dialog -------------------------------- status = "normal"; @@ -35,36 +96,36 @@ fun dialog_setup() local.box; local.lock; local.entry; - + box.image = Image("box.png"); lock.image = Image("lock.png"); entry.image = Image("entry.png"); - + box.sprite = Sprite(box.image); box.x = Window.GetX() + Window.GetWidth() / 2 - box.image.GetWidth ()/2; box.y = Window.GetY() + Window.GetHeight() / 2 - box.image.GetHeight()/2; box.z = 10000; box.sprite.SetPosition(box.x, box.y, box.z); - + lock.sprite = Sprite(lock.image); lock.x = box.x + box.image.GetWidth()/2 - (lock.image.GetWidth() + entry.image.GetWidth()) / 2; lock.y = box.y + box.image.GetHeight()/2 - lock.image.GetHeight()/2; lock.z = box.z + 1; lock.sprite.SetPosition(lock.x, lock.y, lock.z); - + entry.sprite = Sprite(entry.image); entry.x = lock.x + lock.image.GetWidth(); entry.y = box.y + box.image.GetHeight()/2 - entry.image.GetHeight()/2; entry.z = box.z + 1; entry.sprite.SetPosition(entry.x, entry.y, entry.z); - + global.dialog.box = box; global.dialog.lock = lock; global.dialog.entry = entry; global.dialog.bullet_image = Image("bullet.png"); dialog_opacity (1); } - + fun dialog_opacity(opacity) { dialog.box.sprite.SetOpacity (opacity); @@ -110,65 +171,6 @@ fun display_password_callback (prompt, bullets) Plymouth.SetDisplayNormalFunction(display_normal_callback); Plymouth.SetDisplayPasswordFunction(display_password_callback); -#----------------------------------------- Progress Bar -------------------------------- - -progress_box.raw = Image("progress_box.png"); -scale_factor = Window.GetWidth() / progress_box.raw.GetWidth() * 0.8; - -progress_box.image = imgscale( progress_box.raw, scale_factor ); - -progress_box.sprite = Sprite(progress_box.image); - -progress_box.x = Window.GetX() + Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2; -progress_box.y = Window.GetY() + Window.GetHeight() / 2 - progress_box.image.GetHeight() / 2; -progress_box.sprite.SetPosition(progress_box.x, progress_box.y, 0); - -progress_bar.status.raw = Image("segment_status.png"); -progress_bar.runner = Sprite(); -progress_bar.runner.SetImage ( imgscale(progress_bar.status.raw, scale_factor)); - - -progress_bar.x = Window.GetX() + Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2; -progress_bar.y = Window.GetY() + Window.GetHeight() / 2 - progress_box.image.GetHeight() / 2 + - (progress_box.image.GetHeight() - progress_box.image.GetHeight()) / 2; - -#Total steps -steps=33; - -#left corner -progress_bar.l = imgscale( Image("segment_cornerL.png") , scale_factor ); -progress_bar.spriteL = Sprite(); -progress_bar.spriteL.SetImage (progress_bar.l); -progress_bar.spriteL.SetPosition(progress_bar.x,progress_bar.y, 2) ; -progress_bar.x += progress_bar.l.GetWidth()-1; - -#middle -progress_bar.image = imgscale(Image("segment_middle.png"), scale_factor); -step = progress_bar.image.GetWidth()-1; -for( i=0; i 0.99 ) - progress_bar.sprites[i+1].SetZ(2); - if( progress < 0.96 ) - progress_bar.runner.SetPosition(progress_bar.x+progress*step*steps, progress_bar.y, 1); -} - -Plymouth.SetBootProgressFunction(progress_callback); - #----------------------------------------- Quit -------------------------------- fun quit_callback () @@ -205,3 +207,4 @@ fun hide_message_callback (text) Plymouth.SetDisplayMessageFunction (display_message_callback); Plymouth.SetHideMessageFunction (hide_message_callback); + diff --git a/branding-mos-school/components/bootsplash/progress_bar.png b/branding-mos-school/components/bootsplash/progress_bar.png index dd1e747..bf18a66 100644 Binary files a/branding-mos-school/components/bootsplash/progress_bar.png and b/branding-mos-school/components/bootsplash/progress_bar.png differ diff --git a/branding-mos-school/components/bootsplash/progress_box.png b/branding-mos-school/components/bootsplash/progress_box.png index 57a0c30..a677496 100644 Binary files a/branding-mos-school/components/bootsplash/progress_box.png and b/branding-mos-school/components/bootsplash/progress_box.png differ diff --git a/branding-mos-school/components/bootsplash/segment_cornerL.png b/branding-mos-school/components/bootsplash/segment_cornerL.png deleted file mode 100644 index f12b9ac..0000000 Binary files a/branding-mos-school/components/bootsplash/segment_cornerL.png and /dev/null differ diff --git a/branding-mos-school/components/bootsplash/segment_cornerR.png b/branding-mos-school/components/bootsplash/segment_cornerR.png deleted file mode 100644 index 6e3db91..0000000 Binary files a/branding-mos-school/components/bootsplash/segment_cornerR.png and /dev/null differ diff --git a/branding-mos-school/components/bootsplash/segment_middle.png b/branding-mos-school/components/bootsplash/segment_middle.png deleted file mode 100644 index 6093db1..0000000 Binary files a/branding-mos-school/components/bootsplash/segment_middle.png and /dev/null differ diff --git a/branding-mos-school/components/bootsplash/segment_status.png b/branding-mos-school/components/bootsplash/segment_status.png deleted file mode 100644 index 5f12464..0000000 Binary files a/branding-mos-school/components/bootsplash/segment_status.png and /dev/null differ diff --git a/branding-mos-school/components/bootsplash/shutdown16x9.png b/branding-mos-school/components/bootsplash/shutdown16x9.png new file mode 100644 index 0000000..c38b933 Binary files /dev/null and b/branding-mos-school/components/bootsplash/shutdown16x9.png differ diff --git a/branding-mos-school/components/bootsplash/shutdown4x3.png b/branding-mos-school/components/bootsplash/shutdown4x3.png new file mode 100644 index 0000000..5e0ae9e Binary files /dev/null and b/branding-mos-school/components/bootsplash/shutdown4x3.png differ diff --git a/branding-mos-school/components/bootsplash/theme.plymouth.in b/branding-mos-school/components/bootsplash/theme.plymouth.in deleted file mode 100644 index 8a70b9d..0000000 --- a/branding-mos-school/components/bootsplash/theme.plymouth.in +++ /dev/null @@ -1,8 +0,0 @@ -[Plymouth Theme] -Name=@NAME@ -Description=Script for @BRAND_FNAME@ @NAME@ -ModuleName=script - -[script] -ImageDir=/usr/share/plymouth/themes/@THEME@ -ScriptFile=/usr/share/plymouth/themes/@THEME@/theme.script diff --git a/branding-mos-school/images/background16x9.png b/branding-mos-school/images/background16x9.png deleted file mode 100644 index 4451458..0000000 Binary files a/branding-mos-school/images/background16x9.png and /dev/null differ diff --git a/branding-mos-school/images/background4x3.png b/branding-mos-school/images/background4x3.png deleted file mode 100644 index 84b3fbc..0000000 Binary files a/branding-mos-school/images/background4x3.png and /dev/null differ diff --git a/branding-mos-school/images/boot16x9.png b/branding-mos-school/images/boot16x9.png new file mode 100644 index 0000000..051f252 Binary files /dev/null and b/branding-mos-school/images/boot16x9.png differ diff --git a/branding-mos-school/images/boot4x3.png b/branding-mos-school/images/boot4x3.png new file mode 100644 index 0000000..7afb496 Binary files /dev/null and b/branding-mos-school/images/boot4x3.png differ diff --git a/branding-mos-school/images/shutdown16x9.png b/branding-mos-school/images/shutdown16x9.png new file mode 100644 index 0000000..c38b933 Binary files /dev/null and b/branding-mos-school/images/shutdown16x9.png differ diff --git a/branding-mos-school/images/shutdown4x3.png b/branding-mos-school/images/shutdown4x3.png new file mode 100644 index 0000000..5e0ae9e Binary files /dev/null and b/branding-mos-school/images/shutdown4x3.png differ