Hi Marc a small and sorry if sillyquestion but I am in no way a coder but in most of the sample scripts I have messed around by trial and error and made the changes I needed to font size, colors and such
but in the Basic Sample @name "Volume + Text" I cant figure out how to change the text size If possible at all please let me know how to do so
// ==PREPROCESSOR==
// [member=43500]name[/member] "Volume + Text"
// @author "marc2003"
// @import "%fb2k_component_path%helpers.txt"
// ==/PREPROCESSOR==
var g_drag = 0;
var ww = 0, wh = 0;
function on_size() {
ww = window.Width;
wh = window.Height;
}
function on_paint(gr) {
var volume = fb.Volume;
var pos = ww * vol2pos(volume);
var txt = volume.toFixed(2) + 'dB';
FillGradientRectangle(gr, 0, 0, pos, wh, 0, RGB(27, 27, 27), RGB(255, 128, 0));
FillGradientRectangle(gr, pos, 0, ww - pos, wh, 0, RGB(17, 17, 17), RGB(17, 17, 17));
gr.WriteText(txt, '', RGB(201, 201, 201), -237, 33, ww, wh, 2, 2);
gr.DrawRectangle(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 pos = x < 0 ? 0 : x > ww ? 1 : x / ww;
fb.Volume = pos2vol(pos);
}
}
function on_mouse_wheel(delta) {
if (delta > 0)
fb.VolumeUp();
else
fb.VolumeDown();
}
function on_volume_change(val) {
window.Repaint();
}