master
DSLitvinov 2 years ago
parent 65847c0230
commit 289b9c32a9
  1. BIN
      mos-plymputh/background16x9.png
  2. BIN
      mos-plymputh/background4x3.png
  3. BIN
      mos-plymputh/box.png
  4. BIN
      mos-plymputh/bullet.png
  5. 49
      mos-plymputh/bullet.svg
  6. BIN
      mos-plymputh/entry.png
  7. BIN
      mos-plymputh/lock.png
  8. 53
      mos-plymputh/lock.svg
  9. 9
      mos-plymputh/mos.plymouth
  10. 142
      mos-plymputh/mos.script

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="7"
height="7"
viewBox="0 0 1.8520833 1.8520833"
version="1.1"
id="svg5"
inkscape:version="1.2 (1:1.2.1+202207142221+cd75a1ee6d)"
sodipodi:docname="bullet.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="45.254834"
inkscape:cx="5.2591067"
inkscape:cy="4.4194174"
inkscape:window-width="1920"
inkscape:window-height="1007"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2" />
<g
inkscape:label="Слой 1"
inkscape:groupmode="layer"
id="layer1">
<circle
style="fill:#4c6ef5;fill-opacity:1;stroke:none;stroke-width:1.75033"
id="path236"
cx="0.92604166"
cy="0.92604166"
r="0.79374999" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="44"
height="44"
viewBox="0 0 11.641666 11.641667"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2 (1:1.2.1+202207142221+cd75a1ee6d)"
sodipodi:docname="lock.svg"
inkscape:export-filename="lock.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="24.316722"
inkscape:cx="22.782676"
inkscape:cy="24.222015"
inkscape:window-width="1920"
inkscape:window-height="1007"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" /><defs
id="defs2" /><g
inkscape:label="Слой 1"
inkscape:groupmode="layer"
id="layer1"><rect
style="fill:#ffffff;stroke-width:26.4583"
id="rect354"
width="7.5671072"
height="5.9816194"
x="2.0372798"
y="4.9993453"
ry="0.37841314" /><path
style="fill:none;stroke:#fefefe;stroke-width:1;stroke-dasharray:none;stroke-opacity:1"
d="m 3.1810624,5.5285122 0.010156,-2.3296573 c 0.010733,-2.46197711 5.2426785,-2.46196141 5.2535092,0.00452 l 0.01021,2.3251373"
id="path412"
sodipodi:nodetypes="cssc" /></g></svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

@ -1,9 +0,0 @@
[Plymouth Theme]
Name=MOS
Description=MOS Plymouth theme.
ModuleName=script
[script]
ImageDir=/usr/share/plymouth/themes/mos-plymputh
ScriptFile=/usr/share/plymouth/themes/mos-plymputh/mos.script
UseFirmwareBackground=false

@ -1,142 +0,0 @@
# background
fun imgscalelogo( image, scaleX, scaleY )
{
image.Scale( image.GetWidth() * scaleX, image.GetHeight() * scaleY );
}
# background
if( Window.GetWidth()/Window.GetHeight() > 1.5 )
{
logo.raw = Image("background16x9.png");
}
else
{
logo.raw = Image("background4x3.png");
}
logo.image = imgscalelogo( logo.raw, Window.GetWidth()/logo.raw.GetWidth(), Window.GetHeight()/logo.raw.GetHeight());
logo.sprite = Sprite(logo.image);
logo.sprite.SetPosition(0, 0, 0);
#----------------------------------------- Dialog --------------------------------
status = "normal";
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);
dialog.lock.sprite.SetOpacity (opacity);
dialog.entry.sprite.SetOpacity (opacity);
for (index = 0; dialog.bullet[index]; index++)
{
dialog.bullet[index].sprite.SetOpacity(opacity);
}
}
fun display_normal_callback ()
{
global.status = "normal";
if (global.dialog)
dialog_opacity (0);
}
fun display_password_callback (prompt, bullets)
{
global.status = "password";
if (!global.dialog)
dialog_setup();
else
dialog_opacity(1);
for (index = 0; dialog.bullet[index] || index < bullets; index++)
{
if (!dialog.bullet[index])
{
dialog.bullet[index].sprite = Sprite(dialog.bullet_image);
dialog.bullet[index].x = dialog.entry.x + index * dialog.bullet_image.GetWidth();
dialog.bullet[index].y = dialog.entry.y + dialog.entry.image.GetHeight() / 2 - dialog.bullet_image.GetHeight() / 2;
dialog.bullet[index].z = dialog.entry.z + 1;
dialog.bullet[index].sprite.SetPosition(dialog.bullet[index].x, dialog.bullet[index].y, dialog.bullet[index].z);
}
if (index < bullets)
dialog.bullet[index].sprite.SetOpacity(1);
else
dialog.bullet[index].sprite.SetOpacity(0);
}
}
Plymouth.SetDisplayNormalFunction(display_normal_callback);
Plymouth.SetDisplayPasswordFunction(display_password_callback);
#----------------------------------------- Quit --------------------------------
fun quit_callback ()
{
logo.sprite.SetOpacity (1);
}
Plymouth.SetQuitFunction(quit_callback);
#----------------------------------------- Message --------------------------------
message_sprites = [];
message_sprite_count = 0;
message_sprite_y = 10;
fun display_message_callback (text)
{
my_image = Image.Text(text, 1, 1, 1);
message_sprites[message_sprite_count] = Sprite(my_image);
message_sprites[message_sprite_count].SetPosition(10, message_sprite_y, 10000);
message_sprites[message_sprite_count].text = text;
message_sprite_count++;
message_sprite_y += my_image.GetHeight();
}
fun hide_message_callback (text)
{
for (i = 0; i < message_sprite_count; i++)
{
if (message_sprites[i].text == text)
message_sprites[i] = NULL;
}
}
Plymouth.SetDisplayMessageFunction (display_message_callback);
Plymouth.SetHideMessageFunction (hide_message_callback);
Loading…
Cancel
Save