master
DSLitvinov 2 years ago
parent e86e90c3eb
commit 65847c0230
  1. BIN
      mos/background16x9.png
  2. BIN
      mos/background4x3.png
  3. BIN
      mos/boot.png
  4. 5
      mos/boot.svg
  5. BIN
      mos/box.png
  6. BIN
      mos/bullet.png
  7. 49
      mos/bullet.svg
  8. BIN
      mos/entry.png
  9. BIN
      mos/lock.png
  10. 53
      mos/lock.svg
  11. 9
      mos/mos.plymouth
  12. 173
      mos/mos.script
  13. BIN
      mos/progress_bar.png
  14. BIN
      mos/progress_box.png

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: 4.6 KiB

@ -1,5 +0,0 @@
<svg width="276" height="84" viewBox="0 0 276 84" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M243.654 0C232.235 0 221.283 4.42504 213.212 12.3015C205.137 20.178 200.602 30.861 200.602 42C200.602 53.139 205.137 63.822 213.212 71.6985C221.283 79.575 232.235 84 243.654 84C249.776 83.9971 255.831 82.7179 261.41 80.25C266.99 77.7818 271.962 74.181 276 69.6878C272.351 66.3124 260.645 56.6066 260.366 56.3667C265.063 60.1219 260.042 56.0877 260.366 56.3667C258.247 58.7145 255.639 60.5959 252.717 61.8855C249.795 63.1751 246.625 63.8434 243.417 63.846C237.419 63.846 231.666 61.5214 227.421 57.3836C223.18 53.2455 220.797 47.6333 220.797 41.781C220.797 38.8834 221.381 36.0135 222.52 33.3364C223.655 30.6589 225.321 28.2262 227.421 26.1769C229.521 24.1279 232.016 22.5023 234.761 21.3934C237.505 20.2846 240.446 19.7138 243.417 19.7138C249.022 19.7141 254.429 21.7459 258.587 25.4149C264.125 21.0514 273.919 12.8104 274.289 12.4995C271.552 14.9929 274.519 12.3035 274.289 12.4995C270.285 8.54141 265.512 5.39813 260.253 3.25239C254.998 1.10662 249.354 0.00111886 243.654 0V0Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M107.218 42C107.218 18.8038 125.489 -0.000293287 148.03 0C170.57 9.77715e-05 188.842 18.8041 188.842 42C188.842 65.1959 170.57 83.9999 148.03 84C125.489 84.0003 107.218 65.1961 107.218 42ZM168.202 23.1711C168.207 23.2927 168.211 23.4139 168.214 23.535C168.219 23.732 168.22 23.928 168.219 24.1226C168.219 24.1607 168.219 24.1982 168.219 24.2362C168.199 28.1127 167.262 31.6796 165.336 35.2735L165.324 35.2964C165.254 35.427 165.185 35.5573 165.113 35.6876C165.109 35.6952 165.105 35.7027 165.101 35.7102C165.097 35.7171 165.094 35.724 165.09 35.7311C165.088 35.7343 165.085 35.737 165.083 35.7402C163.409 38.7447 161.046 41.7437 157.941 44.8485C157.556 45.2332 157.167 45.6106 156.775 45.982L156.33 51.8329C156.317 52.0093 156.253 52.1778 156.146 52.3184L148.95 61.7743C148.774 62.006 148.502 62.1356 148.221 62.1356C148.137 62.1356 148.052 62.1242 147.968 62.0999C147.605 61.9955 147.343 61.6786 147.309 61.3021L146.508 52.4297L143.782 49.7037C143.554 50.6994 142.997 51.7139 142.128 52.5822C141.609 53.1021 141.025 53.5198 140.393 53.8239C139.544 54.2237 137.381 55.0953 135.091 56.0177L133.924 56.488C133.813 56.5329 133.697 56.5549 133.582 56.5549C133.343 56.5549 133.109 56.4619 132.934 56.2865C132.673 56.0268 132.594 55.6371 132.732 55.2963L133.185 54.1701L133.191 54.1569C134.119 51.853 134.994 49.6792 135.393 48.834C135.699 48.1964 136.117 47.6129 136.637 47.0922C137.506 46.2238 138.52 45.666 139.516 45.4384L136.707 42.629L127.834 41.828C127.457 41.7936 127.14 41.5321 127.036 41.1689C126.931 40.8057 127.061 40.4155 127.362 40.1865L136.818 32.99C136.958 32.8832 137.127 32.8191 137.303 32.8058L143.332 32.3474C143.674 31.9883 144.019 31.6311 144.371 31.2784C147.474 28.1759 150.471 25.814 153.474 24.1405C153.476 24.1391 153.479 24.1373 153.481 24.1355C153.483 24.1336 153.486 24.1318 153.488 24.1304C153.5 24.124 153.511 24.1181 153.522 24.1121C153.534 24.1062 153.545 24.1002 153.556 24.0938C153.585 24.0781 153.614 24.0628 153.642 24.0475C153.678 24.0284 153.714 24.0092 153.75 23.9894C157.412 21.9897 161.04 21.0197 164.991 21.0005C165.024 21 165.058 21 165.091 21C165.289 21 165.488 21.0014 165.688 21.006C165.778 21.0077 165.868 21.0109 165.958 21.0142C165.988 21.0153 166.018 21.0164 166.048 21.0174C166.079 21.0185 166.11 21.0196 166.141 21.0207C166.248 21.0245 166.356 21.0282 166.464 21.0339C166.739 21.0485 167.016 21.066 167.294 21.0893C167.739 21.1269 168.093 21.4804 168.13 21.9261C168.154 22.2041 168.172 22.4812 168.186 22.7569C168.191 22.8639 168.195 22.9703 168.199 23.0768C168.2 23.1071 168.201 23.1374 168.202 23.1677L168.202 23.1711ZM153.798 39.249C154.82 39.249 155.781 38.8505 156.503 38.1282C157.226 37.4055 157.624 36.4446 157.624 35.4224C157.624 34.4001 157.226 33.4393 156.503 32.717C155.012 31.2262 152.585 31.2253 151.092 32.717C149.601 34.2091 149.601 36.6361 151.092 38.1282C151.815 38.851 152.776 39.249 153.798 39.249Z" fill="white"/>
<path d="M0 0V84H22.884V38.8253L41.5171 66.9441H47.7281H53.9416L72.5746 38.8253V84H95.4586V0L73.5542 0.0423496L47.7281 38.9864L21.9018 0.0423496L0 0Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 4.1 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
ScriptFile=/usr/share/plymouth/themes/mos/mos.script
UseFirmwareBackground=false

@ -1,173 +0,0 @@
# background
fun imglogo( 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 = imglogo( logo.raw, Window.GetWidth()/logo.raw.GetWidth(), Window.GetHeight()/logo.raw.GetHeight());
logo.sprite = Sprite(logo.image);
logo.sprite.SetPosition(0, 0, 0);
#----------------------------------------- Ptogress Bar __________________________
if (Plymouth.GetMode () == "boot")
{
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);
}
#----------------------------------------- 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);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

Loading…
Cancel
Save