mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Show splash screen image on reboot and halt.
This commit is contained in:
parent
552ea0356e
commit
de69fe1745
@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Replace HTML tables with markdown tables in README files.
|
- Replace HTML tables with markdown tables in README files.
|
||||||
- Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION` and `UPDATE_NOTIFICATION_MODULE` to Finnish translations.
|
- Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION` and `UPDATE_NOTIFICATION_MODULE` to Finnish translations.
|
||||||
- Run `npm test` on Travis automatically
|
- Run `npm test` on Travis automatically
|
||||||
|
- Show the splash screen image even when is reboot or halted.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Add loaded function to modules, providing an async callback.
|
- Add loaded function to modules, providing an async callback.
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
screen_width = Window.GetWidth();
|
screen_width = Window.GetWidth();
|
||||||
screen_height = Window.GetHeight();
|
screen_height = Window.GetHeight();
|
||||||
|
|
||||||
|
if (Plymouth.GetMode() != "shutdown")
|
||||||
|
{
|
||||||
theme_image = Image("splash.png");
|
theme_image = Image("splash.png");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
theme_image = Image("splash_halt.png");
|
||||||
|
}
|
||||||
|
|
||||||
image_width = theme_image.GetWidth();
|
image_width = theme_image.GetWidth();
|
||||||
image_height = theme_image.GetHeight();
|
image_height = theme_image.GetHeight();
|
||||||
|
|
||||||
@ -30,11 +38,8 @@ else
|
|||||||
image_y = (screen_height - image_height) / 2;
|
image_y = (screen_height - image_height) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Plymouth.GetMode() != "shutdown")
|
|
||||||
{
|
|
||||||
sprite = Sprite (resized_image);
|
sprite = Sprite (resized_image);
|
||||||
sprite.SetPosition (image_x, image_y, -100);
|
sprite.SetPosition (image_x, image_y, -100);
|
||||||
}
|
|
||||||
|
|
||||||
message_sprite = Sprite();
|
message_sprite = Sprite();
|
||||||
message_sprite.SetPosition(screen_width * 0.1, screen_height * 0.9, 10000);
|
message_sprite.SetPosition(screen_width * 0.1, screen_height * 0.9, 10000);
|
||||||
|
BIN
splashscreen/splash_halt.png
Normal file
BIN
splashscreen/splash_halt.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
Loading…
x
Reference in New Issue
Block a user