1
3rd Party Plugins - (fb2k) / Re: JScript Panel script discussion/help
Last post by Defender -The code I have to add per display is an extra line of code per display:
Code: [Select]
gr.WriteTextSimple(chars.pause, g_font_fluent_20, RGB(0,0,0), ax + scale(1), ay + scale(1), ah, ah, 2, 2); // ADDEDThis works but is rather inefficient, since it has to be done for all displays.
gr.WriteTextSimple(chars.pause, g_font_fluent_20, normal_text, ax, ay, ah, ah, 2, 2); // ORIGINAL
How can I create a function that does both displays in one call?
I tried this:
Code: [Select]
_WTS(chars.pause, g_font_fluent_20, normal_text, ax, ay, ah, ah, 2, 2);This and some variants I tried do not work.
function _WTS(txt, font, col, x, y, w, h, txt_align, par_align) {
gr.WriteTextSimple(txt, font, RGB(0,0,0), x+scale(1), y+scale(1), w, h, txt_align, par_align);
gr.WriteTextSimple(txt, font, col, x, y, w, h, txt_align, par_align);
}
How to create a function from where you can do graphical stuff?