Skip to content

Commit

Permalink
plymouth: Update password promt and message
Browse files Browse the repository at this point in the history
Make password promt and message visible. Move message under Windows 95
title and set orange color like shutting down message have.

Signed-off-by: Dmytro Kropenko <[email protected]>
  • Loading branch information
GDGooD committed Dec 4, 2021
1 parent d1c86db commit fce0963
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Plymouth/Chicago95/Chicago95.script
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ for (i = 0; i < 20; i++)

fun refresh_callback ()
{
if (Plymouth.GetMode () == "boot" || Plymouth.GetMode () == "resume")
if ((Plymouth.GetMode () == "boot" || Plymouth.GetMode () == "resume") && global.status == "normal")
{
if (progress == 0)
{
Expand Down Expand Up @@ -45,6 +45,7 @@ fun dialog_setup()
local.box;
local.lock;
local.entry;
local.text;

box.image = Image("box.png");
lock.image = Image("lock.png");
Expand All @@ -67,11 +68,16 @@ fun dialog_setup()
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);


prompt_sprite = SpriteNew();
prompt_sprite.SetPosition(prompt_sprite.x, prompt_sprite.y, prompt_sprite.z);

global.dialog.box = box;
global.dialog.lock = lock;
global.dialog.entry = entry;
global.dialog.bullet_image = Image("bullet.png");
global.dialog.prompt_sprite = prompt_sprite;

dialog_opacity (1);
}

Expand Down Expand Up @@ -100,6 +106,8 @@ fun display_password_callback (prompt, bullets)
dialog_setup();
else
dialog_opacity(1);
dialog.prompt_sprite.SetImage(Image.Text(prompt, 1, 0.5, 0, 1, "Mono Bold 14"));
dialog.prompt_sprite.SetPosition(((screen_width) * 0.3), (screen_height * 0.9), 2);
for (index = 0; dialog.bullet[index] || index < 19; index++)
{
if (!dialog.bullet[index])
Expand Down Expand Up @@ -159,11 +167,11 @@ Plymouth.SetQuitFunction(quit_callback);
#----------------------------------------- Message --------------------------------

message_sprite = Sprite();
message_sprite.SetPosition(10, 10, 10000);
message_sprite.SetPosition((screen_width * 0.3), (screen_height * 0.9), 2);

fun message_callback (text)
{
my_image = Image.Text(text, 1, 1, 1);
my_image = Image.Text(text, 1, 0.5, 0, 1, "Mono Bold 14");
message_sprite.SetImage(my_image);
}

Expand Down

0 comments on commit fce0963

Please sign in to comment.