Show splash screen image on reboot and halt.

This commit is contained in:
Rodrigo Ramírez Norambuena 2017-01-27 13:42:20 -03:00
parent 552ea0356e
commit de69fe1745
3 changed files with 12 additions and 6 deletions

View File

@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Replace HTML tables with markdown tables in README files.
- Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION` and `UPDATE_NOTIFICATION_MODULE` to Finnish translations.
- Run `npm test` on Travis automatically
- Show the splash screen image even when is reboot or halted.
### Added
- Add loaded function to modules, providing an async callback.

View File

@ -1,7 +1,15 @@
screen_width = Window.GetWidth();
screen_height = Window.GetHeight();
theme_image = Image("splash.png");
if (Plymouth.GetMode() != "shutdown")
{
theme_image = Image("splash.png");
}
else
{
theme_image = Image("splash_halt.png");
}
image_width = theme_image.GetWidth();
image_height = theme_image.GetHeight();
@ -30,11 +38,8 @@ else
image_y = (screen_height - image_height) / 2;
}
if (Plymouth.GetMode() != "shutdown")
{
sprite = Sprite (resized_image);
sprite.SetPosition (image_x, image_y, -100);
}
sprite = Sprite (resized_image);
sprite.SetPosition (image_x, image_y, -100);
message_sprite = Sprite();
message_sprite.SetPosition(screen_width * 0.1, screen_height * 0.9, 10000);

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB