I got it fixed you fucking faggots.
function RGB(r,g,b){ return (0xff000000|(r<<16)|(g<<
|(b)); }
var font = gdi.Font("ProFontWindows", 9, 0);
var g_drag = 0;
var ww = 55;
var wh = 13;
var color = RGB((127-255-0));
var frameColor = RGB(27-27-27);
function StringFormat()
{
var h_align = 0,
v_align = 0,
trimming = 0,
flags = 0;
switch (arguments.length)
{
case 4:
flags = arguments[3];
case 3:
trimming = arguments[2];
case 2:
v_align = arguments[1];
case 1:
h_align = arguments[0];
break;
default:
return 0;
}
return ((h_align << 28) | (v_align << 24) | (trimming << 20) | flags);
}
var StringAlignment =
{
Near: 0,
Center: 1,
Far: 2
};
function on_paint(e)
{
e.SetTextRenderingHint(5);
var vol = Math.ceil(Math.pow((100 + fb.Volume) / 100, 2) * 100);
// Draw frame background
e.FillSolidRect(0, 0, ww, wh, frameColor);
e.DrawString("Vol:" + vol + "%", font, color, 0, 0, ww, wh, StringFormat(StringAlignment.Far, StringAlignment.Center));
}
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 / ww;
v = v < 0 ? 0 : (v < 1 ? v : 1);
v = 100 * (Math.pow(v, 1 / 2) - 1);
fb.Volume = v;
}
}
function on_mouse_wheel(delta)
{
fb.Volume += delta;
}
function on_volume_change(val)
{
window.Repaint();
}
Also on the 'README' file it gives a brief explaination on how to do it:
' Volume:
Seekbar:
Right click -> configure, there are comments.
For the seekbar's characters it is rather easy,
just replace the 3 variables inside the barChar array with whatever you desire.'