Now I have installed Zetro XX Mod Skin, there is a PlaybackTime under the Seekbar.
It uses WSH Panel Mod with JS.
How can I round the Playbacklength Time down ?
// ==PREPROCESSOR==
// @name "WSH Song Title"
// ==/PREPROCESSOR==
var align = 0x00000003 | 0x00000008, align_scroll = 0x00000009;
var tf_string = ("[$if(%title%,$replace(%title%,'&','and'),'N/A') /] [$if(%artist%,$replace(%artist%,'&','and'),'N/A')]");
var ww, pos_d = 1, q = 0, timer, g_drag = 0;
var start = true, stopped = false;
//
function RGBA(r, g, b, a) {return ((a << 24) | (r << 16) | (g << 6) | (b));
}
function on_timer(id) {
window.Repaint();
}
function on_playback_new_track(metadb) {
window.Repaint();
}
function on_playback_stop(){
window.Repaint();
}
function on_playback_seek(time){
window.Repaint();
}
function on_playback_time(time){
window.Repaint();
}
function on_playback_pause(state){
window.Repaint();
}
function on_mouse_lbtn_up(x,y){
fb.RunMainMenuCommand("View/Fullscreen");
}
function on_mouse_wheel(delta){
fb.PlaybackTime += delta;
}
function RGB(r, g, b) { return (0xff000000 | (r << 16) | (g << 8) | (b)); }
function on_paint(gr) {
gr.SetTextRenderingHint(5);
//var sf = window.Height/3;//-------------
var font = gdi.Font("Milen", 12, 0);
var text = fb.IsPlaying ? fb.TitleFormat(tf_string).Eval() : (stopped ? "STOP" :"");
var text_width_d = gr.CalcTextWidth(text, font);
ww = window.Width, wh = window.Height, pos = 0, length = fb.PlaybackLength;
if(!timer) timer = window.CreateTimerInterval(40);
q = q + 50;
if(length > 0){
if(g_drag){
pos = window.Width * g_drag_seek;
} else {
pos = window.Width * (fb.PlaybackTime / [length]);
}
} else if (fb.PlaybackTime) {
}
var color1 = RGB(239, 240, 242)
text_width_2 = gr.CalcTextWidth(text, font);
if(text_width_d>ww-15) {
text = text + " " + text;
text_width_2 = gr.CalcTextWidth(text, font);
if(pos_d <= text_width_d - text_width_2) {
pos_d = -4 - (start ? 0 : 1)
start = false;
} else {
pos_d = pos_d - 1;
}
gr.GdiDrawText(text, font, color1, pos_d + 4, 1, text_width_2-4, 40, align_scroll);
} else {
gr.GdiDrawText(text, font, color1, 4, 1, ww-6, 40, align_scroll);
}
function on_size() {
if (g_timer) {window.KillTimer(g_timer); g_timer=false;}
}
function on_playback_pause(state) {
window.Repaint();
}
function on_playback_starting(cmd, is_paused) {}
}