Install the boot splash theme and set up GRUB without Limine
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
Window.SetBackgroundTopColor(0.059, 0.063, 0.071);
|
||||
Window.SetBackgroundBottomColor(0.059, 0.063, 0.071);
|
||||
|
||||
screen.width = Window.GetWidth();
|
||||
screen.height = Window.GetHeight();
|
||||
|
||||
logo.image = Image("logo.png");
|
||||
logo.width = logo.image.GetWidth();
|
||||
logo.height = logo.image.GetHeight();
|
||||
|
||||
scale_x = screen.width / logo.width;
|
||||
scale_y = screen.height / logo.height;
|
||||
|
||||
scale = scale_x;
|
||||
if (scale_y < scale_x) {
|
||||
scale = scale_y;
|
||||
}
|
||||
|
||||
if (scale != 1) {
|
||||
logo.image = logo.image.Scale(logo.width * scale, logo.height * scale);
|
||||
logo.width = logo.image.GetWidth();
|
||||
logo.height = logo.image.GetHeight();
|
||||
}
|
||||
|
||||
logo.sprite = Sprite(logo.image);
|
||||
logo.sprite.SetX((screen.width - logo.width) / 2);
|
||||
logo.sprite.SetY((screen.height - logo.height) / 2);
|
||||
logo.sprite.SetZ(0);
|
||||
|
||||
prompt.sprite = Sprite();
|
||||
prompt.sprite.SetZ(10);
|
||||
message.sprite = Sprite();
|
||||
message.sprite.SetZ(10);
|
||||
|
||||
fun draw_prompt(text) {
|
||||
if (text == "") {
|
||||
prompt.sprite.SetImage(Image.Text(" ", 1, 1, 1));
|
||||
return;
|
||||
}
|
||||
|
||||
prompt.image = Image.Text(text, 0.8, 0.82, 0.85);
|
||||
prompt.sprite.SetImage(prompt.image);
|
||||
prompt.sprite.SetX((screen.width - prompt.image.GetWidth()) / 2);
|
||||
prompt.sprite.SetY(screen.height * 0.82);
|
||||
}
|
||||
|
||||
fun display_password_callback(prompt_text, bullets) {
|
||||
dots = "";
|
||||
index = 0;
|
||||
while (index < bullets) {
|
||||
dots += "*";
|
||||
index++;
|
||||
}
|
||||
draw_prompt(prompt_text + " " + dots);
|
||||
}
|
||||
|
||||
fun display_normal_callback() {
|
||||
draw_prompt("");
|
||||
}
|
||||
|
||||
fun message_callback(text) {
|
||||
message.image = Image.Text(text, 0.8, 0.82, 0.85);
|
||||
message.sprite.SetImage(message.image);
|
||||
message.sprite.SetX((screen.width - message.image.GetWidth()) / 2);
|
||||
message.sprite.SetY(screen.height * 0.9);
|
||||
}
|
||||
|
||||
Plymouth.SetDisplayPasswordFunction(display_password_callback);
|
||||
Plymouth.SetDisplayNormalFunction(display_normal_callback);
|
||||
Plymouth.SetMessageFunction(message_callback);
|
||||
Reference in New Issue
Block a user