Товарищи, подскажите как скрыть надпись в скине
http://s017.radikal.ru/i408/1205/4c/c86e10fb3384.png
сам файл скрипта
[more=клик]/**
* Seekbar script
* This is the seekbar script that updates the seekbar every second a
* track is played. Also the elapsed and total length of a track is implemented
* here.
*
* Always check your script with jslint!
*/
// ------------------------------------------------------------ Properties
var align_top = 2;
var align_middle = 1;
var align_bottom = 2;
var align_left = 0;
var align_center = 1;
var align_right = 2;
var trim_no = 0;
var trim_chara = 1;
var trim_word = 2;
var trim_elips_chara = 3;
var trim_elips_word = 4;
var trim_elips_path = 5;
var flag_rtl = 0x0001;
var flag_vert = 0x0002;
var flag_nofit = 0x0004;
var flag_dispctrl = 0x0020;
var flag_nofallback = 0x0400;
var flag_trailspace = 0x0800;
var flag_nowrap = 0x1000;
var flag_linelimit = 0x2000;
var flag_noclip = 0x4000;
// ------------------------------------------------------------ Font properties
// gdi.Font is changed, the last paramter is style flags
// FontStyleRegular = 0,
// FontStyleBold = 1,
// FontStyleItalic = 2,
// FontStyleBoldItalic = 3,
// FontStyleUnderline = 4,
// FontStyleStrikeout = 8
// Here is 0, means FontStyleRegular
var g_font = gdi.Font("Segoe UI", 10, 0);
var g_drag = 0;
var g_drag_seek = 0;
// ------------------------------------------------------------ Helper methods
function StringFormat(alignH, alignV, trim, flag) {
return ((alignH << 28) | (alignV << 24) | (trim << 20) | flag);
}
function RGB(r, g, b) {
return (0xff000000 | (r << 16) | (g << 8) | (b));
}
// ------------------------------------------------------------ Time methods
function TimeFmt(t) {
var zpad = function (n) {
var str = n.toString();
return (str.length < 2) ? "0" + str : str;
};
var h = Math.floor(t / 3600);
t -= h * 3600;
var m = Math.floor(t / 60);
t -= m * 60;
var s = Math.floor(t);
if (h > 0) {
return h.toString() + ":" + zpad(m) + ":" + zpad(s);
}
return m.toString() + ":" + zpad(s);
}
// ------------------------------------------------------------ Frame dimensions
function get_txt_length() {
if (!fb.PlaybackLength) {
return 148;
}
return Math.floor((TimeFmt(fb.PlaybackLength) + " / " + TimeFmt(fb.PlaybackLength)).length * 5);
}
function get_window_width() {
return window.Width - get_txt_length();
}
// ------------------------------------------------------------ Seekbar
function on_paint(gr) {
// Collect images
var sb_bg_img = gdi.Image(fb.FoobarPath + "skin\\mono_lite\\sb_bg.bmp");
var knob_img = gdi.Image(fb.FoobarPath + "skin\\mono_lite\\sb_knob.png");
// Collect information
var length = fb.PlaybackLength;
var txt = "foobar2000 1.1.6 Fleshgrinder";
var ww = get_window_width();
var wh = window.Height;
var bh = 4;
var pos = 0;
//var g_titlefmt = fb.TitleFormat("%codec% @ %bitrate% kbps");
// Calculate playback time elapsed and total
if (length > 0) {
if (g_drag) {
pos = parseInt(ww * g_drag_seek, 10);
txt = TimeFmt(g_drag_seek * length) + " / " + TimeFmt(length);
}
else {
pos = parseInt(ww * (fb.PlaybackTime / length), 10);
txt = TimeFmt(fb.PlaybackTime) + " / " + TimeFmt(length);
}
}
// Calculate seekbar position
if (pos < 5) {
pos = 0;
}
else if (pos > (ww - 5)) {
pos = ww - 10;
}
else {
pos -= 5;
}
// Draw seekbar
gr.DrawImage(sb_bg_img, 0, wh - 7, ww, bh, 0, 0, 500, bh);
gr.FillSolidRect(0, wh - 6, pos, 2, RGB(160, 160, 160));
gr.DrawImage(knob_img, pos, wh - 10, 10, 10, 0, 0, 10, 10);
// ClearType
gr.SetTextRenderingHint(5);
// Anti-Alias
gr.SetSmoothingMode(4);
// Codec and bitrate
//gr.DrawString(g_titlefmt.Eval(), g_font, RGB(160, 160, 160), 0, 0, ww, wh, StringFormat(align_right, align_top, trim_no, flag_nowrap | flag_noclip));
// Time elapsed / total time
gr.DrawString(txt, g_font, RGB(160, 160, 160), get_txt_length(), 0, ww, wh, StringFormat(align_right, align_top, trim_no, flag_nowrap | flag_noclip));
}
// ------------------------------------------------------------ User interaction methods
function on_size() {
// Do nothing
}
function on_focus(focused) {
//fb.trace("focus " + focused);
}
function on_key_down(key) {
//fb.trace("key " + key);
}
function on_mouse_lbtn_down(x, y) {
g_drag = 1;
}
function on_mouse_lbtn_up(x, y) {
if (g_drag) {
g_drag = 0;
g_drag_seek = x / get_window_width();
g_drag_seek = (g_drag_seek < 0) ? 0 : (g_drag_seek < 1) ? g_drag_seek : 1;
fb.PlaybackTime = fb.PlaybackLength * g_drag_seek;
}
}
function on_mouse_move(x, y) {
if (g_drag) {
g_drag_seek = x / get_window_width();
g_drag_seek = (g_drag_seek < 0) ? 0 : (g_drag_seek < 1) ? g_drag_seek : 1;
window.Repaint();
}
}
function on_mouse_wheel(delta) {
//fb.trace("wheel " + delta);
}
// ------------------------------------------------------------ State change methods
function on_playback_starting(cmd, paused) {
// Do nothing
}
function on_playback_new_track(info) {
window.Repaint();
}
function on_playback_stop() {
window.Repaint();
}
function on_playback_seek(time) {
window.Repaint();
}
function on_playback_pause(state) {
// Do nothing
}
function on_playback_edited() {
// Do nothing
}
function on_playback_dynamic_info() {
// Do nothing
}
function on_playback_dynamic_info_track() {
// Do nothing
}
function on_playback_time(time) {
window.Repaint();
}
function on_volume_change(val) {
// Do nothing
}
//EOF[/more]
если закомментировать "var txt = "foobar2000 1.1.6 Fleshgrinder";" пишет краш скрипта
http://s017.radikal.ru/i408/1205/4c/c86e10fb3384.png
сам файл скрипта
[more=клик]/**
* Seekbar script
* This is the seekbar script that updates the seekbar every second a
* track is played. Also the elapsed and total length of a track is implemented
* here.
*
* Always check your script with jslint!
*/
// ------------------------------------------------------------ Properties
var align_top = 2;
var align_middle = 1;
var align_bottom = 2;
var align_left = 0;
var align_center = 1;
var align_right = 2;
var trim_no = 0;
var trim_chara = 1;
var trim_word = 2;
var trim_elips_chara = 3;
var trim_elips_word = 4;
var trim_elips_path = 5;
var flag_rtl = 0x0001;
var flag_vert = 0x0002;
var flag_nofit = 0x0004;
var flag_dispctrl = 0x0020;
var flag_nofallback = 0x0400;
var flag_trailspace = 0x0800;
var flag_nowrap = 0x1000;
var flag_linelimit = 0x2000;
var flag_noclip = 0x4000;
// ------------------------------------------------------------ Font properties
// gdi.Font is changed, the last paramter is style flags
// FontStyleRegular = 0,
// FontStyleBold = 1,
// FontStyleItalic = 2,
// FontStyleBoldItalic = 3,
// FontStyleUnderline = 4,
// FontStyleStrikeout = 8
// Here is 0, means FontStyleRegular
var g_font = gdi.Font("Segoe UI", 10, 0);
var g_drag = 0;
var g_drag_seek = 0;
// ------------------------------------------------------------ Helper methods
function StringFormat(alignH, alignV, trim, flag) {
return ((alignH << 28) | (alignV << 24) | (trim << 20) | flag);
}
function RGB(r, g, b) {
return (0xff000000 | (r << 16) | (g << 8) | (b));
}
// ------------------------------------------------------------ Time methods
function TimeFmt(t) {
var zpad = function (n) {
var str = n.toString();
return (str.length < 2) ? "0" + str : str;
};
var h = Math.floor(t / 3600);
t -= h * 3600;
var m = Math.floor(t / 60);
t -= m * 60;
var s = Math.floor(t);
if (h > 0) {
return h.toString() + ":" + zpad(m) + ":" + zpad(s);
}
return m.toString() + ":" + zpad(s);
}
// ------------------------------------------------------------ Frame dimensions
function get_txt_length() {
if (!fb.PlaybackLength) {
return 148;
}
return Math.floor((TimeFmt(fb.PlaybackLength) + " / " + TimeFmt(fb.PlaybackLength)).length * 5);
}
function get_window_width() {
return window.Width - get_txt_length();
}
// ------------------------------------------------------------ Seekbar
function on_paint(gr) {
// Collect images
var sb_bg_img = gdi.Image(fb.FoobarPath + "skin\\mono_lite\\sb_bg.bmp");
var knob_img = gdi.Image(fb.FoobarPath + "skin\\mono_lite\\sb_knob.png");
// Collect information
var length = fb.PlaybackLength;
var txt = "foobar2000 1.1.6 Fleshgrinder";
var ww = get_window_width();
var wh = window.Height;
var bh = 4;
var pos = 0;
//var g_titlefmt = fb.TitleFormat("%codec% @ %bitrate% kbps");
// Calculate playback time elapsed and total
if (length > 0) {
if (g_drag) {
pos = parseInt(ww * g_drag_seek, 10);
txt = TimeFmt(g_drag_seek * length) + " / " + TimeFmt(length);
}
else {
pos = parseInt(ww * (fb.PlaybackTime / length), 10);
txt = TimeFmt(fb.PlaybackTime) + " / " + TimeFmt(length);
}
}
// Calculate seekbar position
if (pos < 5) {
pos = 0;
}
else if (pos > (ww - 5)) {
pos = ww - 10;
}
else {
pos -= 5;
}
// Draw seekbar
gr.DrawImage(sb_bg_img, 0, wh - 7, ww, bh, 0, 0, 500, bh);
gr.FillSolidRect(0, wh - 6, pos, 2, RGB(160, 160, 160));
gr.DrawImage(knob_img, pos, wh - 10, 10, 10, 0, 0, 10, 10);
// ClearType
gr.SetTextRenderingHint(5);
// Anti-Alias
gr.SetSmoothingMode(4);
// Codec and bitrate
//gr.DrawString(g_titlefmt.Eval(), g_font, RGB(160, 160, 160), 0, 0, ww, wh, StringFormat(align_right, align_top, trim_no, flag_nowrap | flag_noclip));
// Time elapsed / total time
gr.DrawString(txt, g_font, RGB(160, 160, 160), get_txt_length(), 0, ww, wh, StringFormat(align_right, align_top, trim_no, flag_nowrap | flag_noclip));
}
// ------------------------------------------------------------ User interaction methods
function on_size() {
// Do nothing
}
function on_focus(focused) {
//fb.trace("focus " + focused);
}
function on_key_down(key) {
//fb.trace("key " + key);
}
function on_mouse_lbtn_down(x, y) {
g_drag = 1;
}
function on_mouse_lbtn_up(x, y) {
if (g_drag) {
g_drag = 0;
g_drag_seek = x / get_window_width();
g_drag_seek = (g_drag_seek < 0) ? 0 : (g_drag_seek < 1) ? g_drag_seek : 1;
fb.PlaybackTime = fb.PlaybackLength * g_drag_seek;
}
}
function on_mouse_move(x, y) {
if (g_drag) {
g_drag_seek = x / get_window_width();
g_drag_seek = (g_drag_seek < 0) ? 0 : (g_drag_seek < 1) ? g_drag_seek : 1;
window.Repaint();
}
}
function on_mouse_wheel(delta) {
//fb.trace("wheel " + delta);
}
// ------------------------------------------------------------ State change methods
function on_playback_starting(cmd, paused) {
// Do nothing
}
function on_playback_new_track(info) {
window.Repaint();
}
function on_playback_stop() {
window.Repaint();
}
function on_playback_seek(time) {
window.Repaint();
}
function on_playback_pause(state) {
// Do nothing
}
function on_playback_edited() {
// Do nothing
}
function on_playback_dynamic_info() {
// Do nothing
}
function on_playback_dynamic_info_track() {
// Do nothing
}
function on_playback_time(time) {
window.Repaint();
}
function on_volume_change(val) {
// Do nothing
}
//EOF[/more]
если закомментировать "var txt = "foobar2000 1.1.6 Fleshgrinder";" пишет краш скрипта