Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
branding-SLE.19388
plymouth_parse_newlines.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File plymouth_parse_newlines.patch of Package branding-SLE.19388
diff --git a/SLE.script b/SLE.script index 7c83925..d8f2a75 100644 --- a/SLE/plymouth/theme/SLE.script +++ b/SLE/plymouth/theme/SLE.script @@ -164,12 +164,34 @@ fun display_password_callback (prompt, bullets) } } +fun replace_new_lines(string) + { + index = 0; + ret = String(""); + start = 0; + escape = 0; + while(c = string.CharAt(index)) { + if (escape && c == "n") { + ret += string.SubString(start, index - 1) + "\n"; + start = index + 1; + escape = 0; + } + else if (!escape && c == "\\") { + escape = 1; + } + index++; + } + ret += string.SubString(start, index); + return ret; + } + fun display_message_callback (prompt) { #prompt = Image.Text(prompt, 0.71764706, 0.90588235, 0.58431373); # Change the text to white for better readability -prompt = Image.Text(prompt, 1, 1, 1); +str = replace_new_lines(prompt); +prompt = Image.Text(str, 1, 1, 1); sprite_prompt.SetImage(prompt); #sprite_prompt.SetPosition(Window.GetX() + (Window.GetWidth() - prompt.GetWidth()) / 2, Window.GetY() + Window.GetHeight() * 0.93, 2); sprite_prompt.SetPosition(Window.GetX() + (Window.GetWidth() - prompt.GetWidth()) / 2, Window.GetY() + 20, 2);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor