logo = Image("logo.png"); logo_sprite = Sprite(logo); logo_sprite.SetX(Window.GetWidth() / 2 - logo.GetWidth() / 2); logo_sprite.SetY(Window.GetHeight() * 0.38); logo_sprite.SetZ(10); prompt_sprite = NULL; prompt_image = NULL; fun show_text(txt) { prompt_image = Image.Text(txt, 1.0, 1.0, 1.0); if (prompt_sprite == NULL) prompt_sprite = Sprite(prompt_image); else prompt_sprite.SetImage(prompt_image); prompt_sprite.SetX(Window.GetWidth() / 2 - prompt_image.GetWidth() / 2); prompt_sprite.SetY(Window.GetHeight() * 0.78); prompt_sprite.SetZ(100); prompt_sprite.SetOpacity(1); } fun clear_text() { if (prompt_sprite != NULL) prompt_sprite.SetOpacity(0); } Plymouth.SetDisplayPasswordFunction(fun (prompt, bullets, unused) { show_text(prompt + " " + bullets); }); Plymouth.SetHidePasswordFunction(fun () { clear_text(); }); Plymouth.SetDisplayQuestionFunction(fun (prompt, entry, unused) { show_text(prompt + " " + entry); }); Plymouth.SetHideQuestionFunction(fun () { clear_text(); });