Список разделов › foobar2000 › Секреты foobar2000
// ==PREPROCESSOR==
// @name "VU Meter: Auto Change Or New Track & Mouse wheel scroll"
// @author "AHAPXICT"
// @import "%fb2k_component_path%docs\flags.txt"
// @import "%fb2k_component_path%docs\helpers.txt"
// ==/PREPROCESSOR==
// Note: VU Meter Path: fb.ProfilePath + "\user-components\foo_vis_vumeter\" + "folder name" - Use in configuration menu Properties folder name only! If not folder is <Default>
var btn_font = gdi.Font("Arial Black", 14, 0);
var vu = window.GetProperty("VU Meter: Auto Change Or New Track", false);
var fld = window.GetProperty("VU Meter: folder name", "<Default>");
function get_colors() {
ui_backcol = window.InstanceType == 0 ? window.GetColourCUI(3) : window.GetColourDUI(1);
ui_textcol = window.InstanceType == 0 ? window.GetColourCUI(0) : window.GetColourDUI(0);
ui_btntxtcol = window.InstanceType == 0 ? window.GetColourCUI(2) : window.GetColourDUI(2);
}
get_colors();
function on_size() {
ww = window.Width;
wh = window.Height;
}
function on_paint(gr) {
gr.FillSolidRect(0, 0, ww, wh, ui_backcol);
gr.GdiDrawText(vu ? "VU Meter: Auto Change ON" : "VU Meter: Auto Change OFF", btn_font, vu ? ui_btntxtcol : ui_textcol, 0, 0, ww, wh, DT_VCENTER | DT_CENTER | DT_WORDBREAK | DT_CALCRECT | DT_NOPREFIX);
}
function on_mouse_wheel(step){
if (fld) {step > 0 ? fb.RunMainMenuCommand("View/Visualizations/Analog VU Meter skins/" + fld +"/Next skin") : fb.RunMainMenuCommand("View/Visualizations/Analog VU Meter skins/" + fld +"/Previous skin");}
}
function on_mouse_lbtn_up(x, y){
vu = vu ? false : true;
window.SetProperty("VU Meter: Auto Change Or New Track", vu);
window.Repaint();
}
function on_playback_new_track(metadb) {
vu && fld && fb.RunMainMenuCommand("View/Visualizations/Analog VU Meter skins/" + fld +"/Next skin");
}
Вернуться в Секреты foobar2000