Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: tedgo's DarkOne: Volume button and seekbar (Read 5118 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

tedgo's DarkOne: Volume button and seekbar

Hallo, i'm freshman here hehe.
I'm wonder to know how to write this script to change this skin for foobar
DarkOne by tedgo

and this is my wish version

it is  specaial for me volum and seekbar button script

tedgo's DarkOne: Volume button and seekbar

Reply #1
that's not easy at all i'm afraid. you'd have to very experienced with the various components it uses to re-arrange it like that.

tedgo's DarkOne: Volume button and seekbar

Reply #2
This is a some like volume fader

This is a script for that, how to changa a color??
Code: [Select]
function RGB(r,g,b){ return (0xff000000|(r<<16)|(g<<8)|(b)); }

var g_font = gdi.Font("Tahoma", 12, 0);
var g_drag = 0;

function on_paint(gr){
    gr.SetTextRenderingHint(5);
    var ww = window.Width;
    var wh = window.Height;
    var volume = fb.Volume;
    var pos = window.Width * ((100+volume)/100);
    var txt = (Math.ceil(volume)) + "dB";
    gr.FillGradRect(  0, 0,    pos, wh, 90, RGB(240,240,240), RGB(100,230,100));
    gr.FillGradRect(pos, 0, ww-pos, wh, 90, RGB(240,240,240), RGB(190,190,190));
    gr.DrawString(txt, g_font, RGB(64,64,128), 0, 0, ww, wh, 0x11005000);
    gr.DrawRect(0,0, ww-1, wh-1, 1.0, RGB(150,150,150));
}
function on_mouse_lbtn_down(x,y){
    g_drag = 1;
}
function on_mouse_lbtn_up(x,y){
    on_mouse_move(x,y);
    g_drag = 0;
}
function on_mouse_move(x,y){
    if(g_drag){
        var v = x / window.Width;
        v = (v<0) ? 0 : (v<1) ? v : 1;
        v = -100 * (1-v);
        if(fb.Volume != v)
            fb.Volume = v;
    }
}
function on_mouse_wheel(delta){
    if(delta>0)
        fb.VolumeUp();
    else
        fb.VolumeDown();
}
function on_volume_change(val){
    window.Repaint();
}
//EOF


This is my foobar

tedgo's DarkOne: Volume button and seekbar

Reply #3
gr.FillGradRect(  0, 0,    pos, wh, 90, RGB(240,240,240), RGB(100,230,100));
    gr.FillGradRect(pos, 0, ww-pos, wh, 90, RGB(240,240,240), RGB(190,190,190));

change the values in bold

tedgo's DarkOne: Volume button and seekbar

Reply #4
thanks so much for that.
One more questio how - if it possible -  can I use this script fo seekbar??