Skip to content
Snippets Groups Projects
Commit eb8fd8a9 authored by Kayz's avatar Kayz Committed by Rob Swindell
Browse files

allows more flexibility in formatting xtrn program menus by allowing one to...

allows more flexibility in formatting xtrn program menus by allowing one to remove the titles or underline headings by setting them to 'none' in the ini file
parent 268f540c
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
; section_which: \r\n\1-\1gWhich, \1w\1h~Q\1n\1guit or [1]: \1h ; section_which: \r\n\1-\1gWhich, \1w\1h~Q\1n\1guit or [1]: \1h
; uncomment and modify any of the below to change the look of the external programs menu ; uncomment and modify any of the below to change the look of the external programs menu
; to remove titles or underline, set to the text ' '
; header_fmt: \1n\1c\1h%s \1n\1cExternal Programs:\r\n\r\n ; header_fmt: \1n\1c\1h%s \1n\1cExternal Programs:\r\n\r\n
; titles: \1n\1cNum \1h\xb3\1n\1c Name \1n\1c ; titles: \1n\1cNum \1h\xb3\1n\1c Name \1n\1c
; multicolumn_fmt: \1h\1c%3u \xb3 \1n\1c%-32.32s \1h ; multicolumn_fmt: \1h\1c%3u \xb3 \1n\1c%-32.32s \1h
......
...@@ -138,15 +138,20 @@ function external_program_menu(xsec) ...@@ -138,15 +138,20 @@ function external_program_menu(xsec)
if(options.sort) if(options.sort)
prog_list.sort(sort_by_name); prog_list.sort(sort_by_name);
printf(options.header_fmt, xtrn_area.sec_list[xsec].name); printf(options.header_fmt, xtrn_area.sec_list[xsec].name);
if(options.titles.trimRight() != '')
write(options.titles); write(options.titles);
if(multicolumn) { if(multicolumn) {
write(options.multicolumn_separator); write(options.multicolumn_separator);
if (options.titles.trimRight() != '')
write(options.titles); write(options.titles);
} }
if(options.underline.trimRight() != '') {
console.crlf(); console.crlf();
write(options.underline); write(options.underline);
}
if(multicolumn) { if(multicolumn) {
write(options.multicolumn_separator); write(options.multicolumn_separator);
if (options.underline.trimRight() != '')
write(options.underline); write(options.underline);
} }
console.crlf(); console.crlf();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment