Áûâàëûé ïèñèêàðùèê
Ðåãèñòðàöèÿ: 14.06.2013
Ðåãèîí: Óêðàèíà
Ìàøèíà: Nissan Qashqai+2
Ñîîáùåíèé: 3,424
|
Ïðèâåò!
1. ïîïðîáóé ïîñòàâü Playback follows cursor â íàñòðîéêàõ Ôóáàðà .
2. ïîñìîòðþ..
...........
Ïîñìîòðåë, (ïðîâåðü) ÏÊÌ ïî íèæíèì êíîïêàì è çàìåíè ñêðèïò :
Êîä:
// ==PREPROCESSOR==
// @import "%fb2k_path%\themes\4Icar\Scripts\Flags.txt"
// @import "%fb2k_path%\themes\4Icar\Scripts\Helpers.txt"
// @feature "v1.4"
// @feature "watch-metadb"
// ==/PREPROCESSOR==
var flag = false;
var name = "4Icar";
var imgPath = fb.FoobarPath + "Themes\\"+name+"\\Images\\";
try{
var btn_type = window.GetProperty("SYS.Button Folder","btn_set_1");
};catch(e){}
var m_t = window.GetProperty("Mouse_touch",1);
var rot1 = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\rot1.png")
var rot2 = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\rot2.png")
var rot3 = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\rot3.png")
var rot4 = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\rot4.png")
var DSP_S_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\dsp_s.png")
var B = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\BUTTON.png");
var ZERRO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\ZERRO.png");
var ANIM_BUT = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\ANIM_BUT.png");
var ANIM_BUT_L = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\ANIM_BUT_L.png");
var ANIM_BUT_R = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\ANIM_BUT_R.png");
var ANIM_BUT_L1 = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\ANIM_BUT_L1.png");
var ANIM_BUT_L2 = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\ANIM_BUT_L2.png");
var ANIM_BUT_L2 = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\ANIM_BUT_L2.png");
var ANIM_BUT_R1 = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\ANIM_BUT_R1.png");
var ANIM_BUT_R2 = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\ANIM_BUT_R2.png");
var NEXT_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\NEXT_ICO.png");
var PREV_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\PREV_ICO.png");
var PLAY_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\PLAY_ICO.png");
var PAUSE_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\PAUSE_ICO.png");
var STOP_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\STOP_ICO.png");
var SEARCH_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\search.png");
var LIBRARY1_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\lib1.png");
var LIBRARY2_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\lib2.png");
var CLEAR_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\clear.png");
var CLOSE_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\close.png");
var DEL_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\del.png");
var DSP_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\dsp.png");
var MILK_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\milk.png")
var PLAYLIST_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\playlist.png");
var PREF_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\pref.png");
var SEARCH_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\search.png");
var SHOWNPL_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\show_now_pl.png");
var TAB_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\tab.png");
var TOOLBAR_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\toolbar_on.png");
var TOOLBAR_ICO_OFF = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\toolbar_off.png");;
var ROTATE_ICO = gdi.Image(imgPath + "Buttons\\" + btn_type + "\\rotate.png");
var WshShell = new ActiveXObject("WScript.Shell");
var CtrlDown = ShiftDown = button_timer = xy = false;
var button_timeout;
var hbtn;
var dbtn;
var rbtn_up = true ;
var tooltip = window.CreateTooltip();
// ===================================================== //
function Button(x, y, w, h, img, img2, onclick) {
this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.img = img;
this.img2 = img2;
this.onclick = onclick;
this.state = 0;
this.opacity = 0;
this.refresh = 0;
this.xy = function (x, y) {
return (this.x <= x) && (x <= this.x + this.w) && (this.y <= y) && (y <= this.y + this.h);
}
// ===================================
this.changeState = function (state) {
if (!button_timer) button_timer = window.CreateTimerInterval(60);
window.RepaintRect(this.x-2, this.y-2, this.w+4, this.h+4);
this.state = state;
this.refresh = 1;
}
//------------------> Draw Buttons
this.draw = function (gr) {
var state = this.state;
var op = this.opacity;
on_draw(gr, x, y, w, h, img, img2, op, state);
}
// ===================================
this.Opacity = function () {
if(this.state == 1 && this.opacity < 255)
this.opacity = Math.min(this.opacity + 10, 255);
if(this.state == 0 && this.opacity > 0)
this.opacity = Math.max(0,this.opacity - 10);
if (this.opacity == 0){
this.refresh = 0;
button_timeout = window.CreateTimerTimeout(0);
}
};
// ===================================
this.onClick = function () {
this.onclick && this.onclick();
}
}
// ========================================================================== //
buttons_on_mouse_move = function(x, y){
xy = false;
for (var i = 0; i < $buttons.length; i++)
if ($buttons[i].xy(x, y)) {
xy = true;
if (hbtn != $buttons[i] ) {
if (hbtn) hbtn.changeState(0);
hbtn = $buttons[i];
hbtn.changeState(m_t);//1
};
}
if (xy == false) {
if (hbtn) {
hbtn.changeState(0);
hbtn = undefined;
};
}
}
// ========================================================================== //
buttons_on_mouse_lbtn_down = function (x, y) {
if (hbtn) {
dbtn = hbtn;
dbtn.changeState(2);
}
}
// ========================================================================== //
buttons_on_mouse_lbtn_up = function (x, y) {
if (dbtn) {
dbtn.changeState(1);
dbtn.onClick();
dbtn = undefined;
}
}
// ========================================================================== //
buttons_on_mouse_leave = function () {
if (hbtn) {
hbtn.changeState(0);
hbtn = undefined;
}
}
// ========================================================================== //
buttons_on_timer = function(id){
if (button_timeout && id == button_timeout.ID) {
if (button_timer) window.KillTimer(button_timer);
button_timer = false;
}
for (var i = 0; i < $buttons.length; i++) {
if ($buttons[1].refresh) {
$buttons[1].Opacity();
}
}
}
SYS_check();
window.NotifyOthers("SYS.Button Folder", btn_type)
var set_path = fb.ProfilePath + "\\settings\\";
var CTRL_prop = window.GetProperty("_CTRL_Time_Wait",15000)
window.SetProperty("_CTRL_Time_Wait",CTRL_prop);
utils.WriteINI( set_path + 'settings.ini', 'ctrl_timer', 'TimeWait',CTRL_prop)
utils.WriteINI( set_path + 'settings.ini', 'plmanager', 'plmanager_status',0)
if (Man_set_off= utils.ReadINI( set_path + 'settings.ini', 'close_man', 'man_off')==2){
utils.WriteINI( set_path + 'settings.ini', 'close_man', 'man_off', 0);f
}
var man = window.GetProperty("SYS.Man Switch", 0);
function default_layout() {
pss.GetPanel(c_panel).Show();
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh-5, true);
if (panel == 16 ){
pss.GetPanel(2).Show(true); /*PANEL: [lib_buttons]*/
pss.GetPanel(2).Move(ww - bw, wh / 2-bh*2, ww, bh * 3, true);
}
pss.GetPanel(13).Show(true);
pss.GetPanel(13).Move(0, wh-bh-4, bw, bh+4,true);
pss.GetPanel(14).Show(true);
pss.GetPanel(14).Move(bw*4, wh-bh-3, ww-bw*8, bh-2,true);
};
//=======================================================
// Keyboard Flags & Tools
SM_CXVSCROLL = 2;
SM_CYHSCROLL = 3;
var VK_BACK = 0x08;
var VK_RETURN = 0x0D;
var VK_SHIFT = 0x10;
var VK_CONTROL = 0x11;
var VK_ALT = 0x12;
var VK_ESCAPE = 0x1B;
var VK_PGUP = 0x21;
var VK_PGDN = 0x22;
var VK_END = 0x23;
var VK_HOME = 0x24;
var VK_LEFT = 0x25;
var VK_UP = 0x26;
var VK_RIGHT = 0x27;
var VK_DOWN = 0x28;
var VK_INSERT = 0x2D;
var VK_DELETE = 0x2E;
var VK_SPACEBAR = 0x20;
var VK_Z = 0x5A;
var VK_X = 0x58;
var VK_Q = 0x51;
var VK_A = 0x41;
var VK_NUMPAD0 = 0x60
var VK_NUMPAD3 = 0x63
var VK_NUMPAD9 = 0x69
var KMask = {
none: 0,
ctrl: 1,
shift: 2,
ctrlshift: 3,
ctrlalt: 4,
ctrlaltshift: 5,
alt: 6
};
function GetKeyboardMask() {
var c = utils.IsKeyPressed(VK_CONTROL) ? true : false;
var a = utils.IsKeyPressed(VK_ALT) ? true : false;
var s = utils.IsKeyPressed(VK_SHIFT) ? true : false;
var ret = KMask.none;
if (c && !a && !s) ret = KMask.ctrl;
if (!c && !a && s) ret = KMask.shift;
if (c && !a && s) ret = KMask.ctrlshift;
if (c && a && !s) ret = KMask.ctrlalt;
if (c && a && s) ret = KMask.ctrlaltshift;
return ret;
};
//======================================================= Variables
var autolibtopl = window.GetProperty("Auto Library to Playlist", false)
var WshShell = new ActiveXObject("WScript.Shell");
var fso = new ActiveXObject("Scripting.FileSystemObject")
var set_path = fb.ProfilePath + "\\settings\\";
var NOW_prop = 1600;
var TAB_prop = window.GetProperty("_TAB_Timer",10)* 1000;
var DEL_prop = window.GetProperty("_DEL_Timer",25)* 1000;
var VU_prop = window.GetProperty("_VU_Timer",5)* 1000;
var Milk_prop = window.GetProperty("_Milk_Timer",6)* 1000;
var swbt = window.GetProperty("swbt", 0);
var swvk = window.GetProperty("swvk", 0);
var Milk_Timer = false;
var DEL_Timer = false;
var TAB_Timer = false;
var VU_Timer = false;
var NOW_Timer = false;
var Milk_set_off = 0;
var Tab_set_off = 0;
var Del_set_off = 0;
var VU_set_off = 0;
var butt_type = window.GetProperty("PROP.Button_type", "space.exe");
var butt_type2 = window.GetProperty("PROP.Button_type2", "shift.exe");
var toolbar_prop = window.GetProperty("PROP.Toolbar_Timer", 10) * 1000;
var click_prop = window.GetProperty("PROP.Click_Timer", 30);
var btn_switch_prop = window.GetProperty("PROP.Button_Switch_Timer", 3) * 900;
var pb_font_name_prop = window.GetProperty("Playback Time Font Name", "Segoe UI");
var pb_font_size_prop = window.GetProperty("Playback Time Font Size", 25);
var s = window.GetProperty("SYS.Button Switch", 1);
var set_path_wsh_data = fb.ProfilePath + "\\wsh_data\\"; // path for remdir file
var set_path2_wsh_data = download_folder + "\\wsh_data\\"; // path for remdir file
var download_folder = window.GetProperty("Download to Disk","D:\\")
var custom_folder = window.GetProperty("Download to Custom Folder|Disk", false);
var sw_vu = window.GetProperty("VU buttons auto hide", false);
var q = window.GetProperty("swsq", 0), swsq;
swbt =3;
try {
var btn_type = window.GetProperty("SYS.Button Folder", "btn_set_1");
};
catch (e) {
var btn_type = "btn_set_1";
};
var imgPath = fb.FoobarPath + "Themes\\" + name + "\\Images\\";
var d = new Date();
//var str = "";
var toolbar_timer = false;
var click_timer = false;
var btn_switch_timer = false;
//////////////////////////////////////////
var g_font = gdi.Font(pb_font_name_prop, pb_font_size_prop, 0);
var g_font2 = gdi.Font(pb_font_name_prop, pb_font_size_prop / 2, 0);
var dsp_color = RGBA(210, 210, 210, 100);
var dsp_off = 0;
var bw = B.width;
var bh = B.height;
var background_color = window.GetProperty("COLOR.Background", "RGB(0,0,0)");
var bottom_gradient_color = window.GetProperty("COLOR.Bottom Gradient 1", "RGBA(15,15,15,200)");
var bottom_gradient_color2 = window.GetProperty("COLOR.Bottom Gradient 2", "RGBA(50,50,50,200)");
var bottom_gradient_color_angle1 = window.GetProperty("COLOR.Bottom Gradient 1 Angle", -90);
var bottom_gradient_color_angle2 = window.GetProperty("COLOR.Bottom Gradient 2 Angle", 90);
var bottom_gradient_color_angle3 = window.GetProperty("COLOR.Bottom Gradient 3 Angle", -90);
var g_background_color = 0,
g_bottom_gradient_color = 0,
g_bottom_gradient_color2 = 0;
function get_colors() {
if (background_color.length > 0) g_background_color = eval(background_color);
if (bottom_gradient_color.length > 0) g_bottom_gradient_color = eval(bottom_gradient_color);
if (bottom_gradient_color2.length > 0) g_bottom_gradient_color2 = eval(bottom_gradient_color2);
};
function on_colors_changed() {
get_colors();
CollectGarbage();
window.Repaint();
};
get_colors();
var sac = saci = lbtn_down= false;
//====================================================== ANIM var
var anim_time_step = window.GetProperty("SYS.Animation keyb Time Step setup", 3);
var anim_step = window.GetProperty("SYS.Animation keyb Panel Step setup", 8);
var animation_status = window.GetProperty("SYS.Animation_Status", false);
var a_timer = anim_time_step;
var panel = window.GetProperty("SYS.panel", 5);
var c_panel = panel, n_panel;
var panels = 13;
var old_panel = panel;
var dir_move, move = false;
var y = 3;
var is_plmanager = 0;
var c_x = 0;
var n_x = 0;
var c_ww = 0;
var n_ww = 0;
var timer_anim = false;
//==============================
var step_c = anim_step; //window.GetProperty("SYS.step_c", 8); //def 8
var step_n = anim_step; //window.GetProperty("SYS.step_n", 8); //def 8
//==============================
var toolbar_open = 0
var on_mouse = false;
//======================================================= recalc
function recalc_dimensions() {
q = window.GetProperty("swsq");
ww = window.Width;
wh = window.Height;
bh = B.height;
bw = B.width;
bx = B.width;
by = wh - ANIM_BUT.height / 3 - 4;
panel== 16 ? Lib_var= LIBRARY1_ICO : Lib_var = LIBRARY2_ICO ;
var ROT_var ;
if (panel== 5 ) {
ROT_var= rot1 ;
}
else if (panel== 9 ) {
ROT_var= rot2 ;
}
else if (panel== 15 ) {
ROT_var= rot3 ;
}
else if (panel== 8 ) {
ROT_var= rot1 ;
}
else {
ROT_var= rot3 ;
}
toolbar_open== 1 ? t_ico = TOOLBAR_ICO_OFF : t_ico = TOOLBAR_ICO;
$buttons = [
//prev 1
new Button(bx, by-1, B.width, B.height, ANIM_BUT, PREV_ICO, function() {
fb.Prev();
recalc_dimensions();
window.RepaintRect(0, wh - bh - 4, ww , bh);
}),
// play 2
new Button(bx * 2, by-1, B.width, B.height, ANIM_BUT, fb.IsPlaying ? (fb.IsPaused ? PLAY_ICO : PAUSE_ICO) : PLAY_ICO, function() {
fb.PlayOrPause();
}),
// next 3
new Button(bx * 3, by-1, B.width, B.height, ANIM_BUT, NEXT_ICO, function() {
fb.Next();
recalc_dimensions();
window.RepaintRect(0, wh - bh - 4, ww , bh);
}),
// Lib
new Button(ww - bx, by-1, B.width, B.height, ANIM_BUT, Lib_var, function() {
CollectGarbage();
panel = panel == 16 ? 11 : 16
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
if (panel == 16 ){
pss.GetPanel(2).Show(true); /*PANEL: [lib_buttons]*/
pss.GetPanel(2).Move(ww - bw, wh / 2-bh*2, ww, bh * 3, true);
}
SYS_check();
swbt = 2;
recalc_dimensions();
window.Repaint();
}),
//NOW PL
new Button(ww - bx * 3, by-1, B.width, B.height, ANIM_BUT, SHOWNPL_ICO, function() {
if (NOW_Timer) NOW_Timer.Dispose()
//
pss.GetPanel(0).Show(false)
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh - 5 , true);
if (panel==5) {
if (!NOW_Timer) {
try {
WshShell.Run(".\\Emul\\" + "click.exe");
} catch(e) {}
} else if (NOW_Timer){
q++;
if (q > 2)
q = 0;
window.SetProperty("swsq", q);
DEF_check()
CollectGarbage();
// pss.GetPanel(0).Show(false)
//pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh - 5 , true);
swbt = 3;
// pss.GetPanel(8).Show(false);
window.SetProperty("SYS.VU_buttons_status",false);
try {
WshShell.Run(".\\Emul\\" + "click.exe");
} catch(e) {}
}
NOW_Timer = false ;
NOW_Timer = window.CreateTimerInterval(NOW_prop);
}else {
if (animation_status) {
animation_status = false;
window.SetProperty("SYS.Animation_Status", animation_status);
flag = true
}
//SYS_check() ;
DEF_check()
pss.GetPanel(0).Show(false) ;
pss.GetPanel(c_panel).Show();
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh - 5, true);
panel = 5;
dir_move = panel > old_panel ? "right" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
try {
WshShell.Run(".\\Emul\\" + "click.exe");
} catch(e) {}
}
}
SYS_check()
recalc_dimensions();
window.RepaintRect(0, wh - bh - 4, ww , bh);
swbt = 3;
NOW_Timer = window.CreateTimerInterval(NOW_prop);
}),
//4panel
new Button(ww - bx * 2, by-1, B.width, B.height, ANIM_BUT, ROT_var, function() {
pss.GetPanel(0).Show(false);
pss.GetPanel(0).Move(bw*4, wh-bh*2-3, ww-bw*8, bh-2,true); /*PANEL: [volume]*/
swbt ++;
if (swbt > 3)
swbt=1
window.SetProperty("swbt", swbt)
CollectGarbage();
/*
if (swbt == 1) {
// pss.GetPanel(8).Show(false);
dsp_switch_check_timer = false;
window.SetProperty("SYS.VU_buttons_status",false);
panel = 5;
dir_move = panel > old_panel ? "right" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
}
*/
if (swbt == 1) {
window.SetProperty("SYS.VU_buttons_status",false);
panel = 9; /*PANEL: [alb_library]*/
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
SYS_check();
}
if (swbt == 2) {
window.SetProperty("SYS.VU_buttons_status",false);
panel = 15;
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
SYS_check();
}
if (swbt == 3) {
panel = 8;
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
SYS_check();
pss.GetPanel(15).Show(false);
pss.GetPanel(6).Move(bw*3, wh-bh-4, ww-bw*6, bh-2,true);
pss.GetPanel(6).Show(true);
pss.GetPanel(7).Move(0, wh - bh - 5, ww , bh, true);
pss.GetPanel(7).Show(true);
if (sw_vu = window.GetProperty("VU buttons auto hide") == true) {
VU_Timer = window.CreateTimerInterval(VU_prop);
}
}
recalc_dimensions();
window.RepaintRect(0, wh - bh - 4, ww , bh);
}),
//toolbar
new Button(ww - bx * 4, by-1, B.width, B.height, ANIM_BUT, t_ico, function() {
if (DEL_Timer) DEL_Timer.Dispose();
if (toolbar_timer) toolbar_timer.Dispose();
if (VU_Timer) VU_Timer.Dispose();
utils.WriteINI( set_path + 'settings.ini', 'close_ctrl', 'ctrl', 1)
toolbar_open ++
if (toolbar_open > 1) {toolbar_open=0}
if (toolbar_open == 0){
if (toolbar_timer) toolbar_timer.Dispose();
pss.GetPanel(0).Show(false)
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh-5 , true)
}
if (toolbar_open == 1){
pss.GetPanel(c_panel).Show();
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh - 5, true);
pss.GetPanel(0).Show(true)
pss.GetPanel(0).Move(bw*4, wh-bh*2-3, ww-bw*8, bh-2,true);
pss.GetPanel(1).Show(false)
pss.GetPanel(4).Show(false)
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh * 2-5, true)
toolbar_timer = window.CreateTimerInterval(toolbar_prop);
}
window.RepaintRect(0, wh - bh*2 - 4, ww , bh*2);
recalc_dimensions();
//DEF_check()
}),
//=============================================top left 4 buttons
// DEL butt
new Button(0, by - B.height-1, B.width, B.height, ANIM_BUT, DEL_ICO, function() {
if (DEL_Timer) DEL_Timer.Dispose();
if (toolbar_timer) toolbar_timer.Dispose();
if (VU_Timer) VU_Timer.Dispose();
if (animation_status) {
animation_status = false;
window.SetProperty("SYS.Animation_Status", animation_status);
flag = true
}
panel = 5
dir_move = panel > old_panel ? "left" : "left";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
SYS_check()
pss.GetPanel(4).Show(true);
pss.GetPanel(4).Move(ww - bw, wh / 2-bh*2, ww, bh * 3, true);
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh - 5 , true);
DEL_Timer = window.CreateTimerInterval(DEL_prop);
swbt = 0;
recalc_dimensions();
window.Repaint();
}),
//DSP set
new Button(bx, by - B.height-1, B.width, B.height, ANIM_BUT, DSP_S_ICO, function() {
try {
fb.RunMainMenuCommand("View/DSP/DSP #2 config");
} catch (e) {};
}),
//DSP
new Button(bx*2, by - B.height-1, B.width, B.height, ANIM_BUT, DSP_ICO, function() {
if (VU_Timer) VU_Timer.Dispose();
if (DEL_Timer) DEL_Timer.Dispose();
if (toolbar_timer) toolbar_timer.Dispose();
if (toolbar_timer) toolbar_timer.Dispose();
pss.GetPanel(0).Show(false)
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh-5 , true)
toolbar_open = 0
if (animation_status) {
animation_status = false;
window.SetProperty("SYS.Animation_Status", animation_status);
flag = true
}
panel = 10; //PANEL: [dsp_changer]
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
SYS_check()
swbt = 1;
recalc_dimensions();
window.RepaintRect(0, wh - bh - 4, ww , bh);
}),
// MILK
new Button(bx * 3, by - B.height-1, B.width, B.height, ANIM_BUT, MILK_ICO, function() {
pss.GetPanel(0).Show(false);
pss.GetPanel(c_panel).Show();
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh-5 , true)
if (DEL_Timer) DEL_Timer.Dispose();
if (toolbar_timer) toolbar_timer.Dispose();
toolbar_open = 0
panel = 12;
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
SYS_check()
Milk_Timer = window.CreateTimerInterval(Milk_prop);
pss.GetPanel(3).Show(true);
pss.GetPanel(3).Move(0, wh - bh - 4, ww , bh, true);
}),
//=================================================== top right 4 buttons
new Button(ww - bx, by - B.height-1, B.width, B.height, ANIM_BUT, CLOSE_ICO, function() {
var set_path = fb.ProfilePath + "\\settings\\";
if(utils.ReadINI( set_path + 'settings.ini', 'clear_pic', 'clearpic')==1)
try {
{WshShell.Run(set_path_wsh_data + "RemoveDir.exe");}
} catch(e) {}
fb.RunMainMenuCommand("File/Exit");
}),
// Preferences
new Button(ww - bx * 2, by - B.height-1, B.width, B.height, ANIM_BUT, PREF_ICO, function() {
fb.ShowPreferences();
}),
// search
new Button(ww - bx * 3, by - B.height-1, B.width, B.height, ANIM_BUT, SEARCH_ICO, function() {
if (animation_status) {
animation_status = false;
window.SetProperty("SYS.Animation_Status", animation_status);
flag = true
}
panel = 5
dir_move = panel > old_panel ? "left" : "left";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
SYS_check();
pss.GetPanel(1).Show() == true ? pss.GetPanel(1).Show(false) : pss.GetPanel(1).Show(true) & pss.GetPanel(1).Move(0, wh-bh-301 , ww, 299, true);;
pss.GetPanel(0).Show(false)
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh - 5 , true);
swbt = 3
recalc_dimensions();
}),
// TAB
new Button(ww - bx * 4, by - B.height-1, B.width, B.height, ANIM_BUT, TAB_ICO, function() {
if (animation_status) {
animation_status = false;
window.SetProperty("SYS.Animation_Status", animation_status);
flag = true
}
toolbar_open=0
if (toolbar_timer) toolbar_timer.Dispose();
pss.GetPanel(0).Show(false)
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh-5 , true)
panel = 5;
dir_move = panel > old_panel ? "right" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
swbt = 3;
SYS_check()
recalc_dimensions()
window.RepaintRect(0, wh - bh - 4, ww , bh);
window.NotifyOthers("SYS.Butt_tool", "tool")
})
]
}
//------------------------------------------------------------------------//
recalc_dimensions();
// ================================================== //
function on_draw(gr, x, y, w, h, img, img2, op,state) {
gr.DrawImage(img, Math.ceil(x), Math.ceil(y), Math.ceil(w), Math.ceil(h), 0, state * h, Math.ceil(w), Math.ceil(h), 0, 255);
gr.DrawImage(img2, Math.ceil(x), Math.ceil(y), Math.ceil(w), Math.ceil(h), 0, state * h, Math.ceil(w), Math.ceil(h), 0, 255);
}
// ================================================== // ON PAINT
function on_paint(gr) {
gr.FillSolidRect(0, 0, ww, wh, g_background_color); //bg
gr.FillGradRect(0, wh - bh - 5, ww, bh+5 , bottom_gradient_color_angle1, g_bottom_gradient_color, g_bottom_gradient_color2); // bottom grad
//=====================
for (var i = 0; i < 7; i++) {
$buttons[i].draw(gr);
}
//----------------------------------------------
if (toolbar_open) {
gr.FillGradRect(0, wh - bh*2-5, ww, bh, bottom_gradient_color_angle1, g_bottom_gradient_color, g_bottom_gradient_color2); // bottom grad
for (var i = 7; i < $buttons.length; i++) {
$buttons[i].draw(gr);
}
var dsp = utils.ReadINI(set_path + 'settings.ini', 'dsp', 'preset')
} else {};
}
// ================================================== //
function on_size() {
if (!window.Width || !window.Height) {
return;
}
ww = window.Width;
wh = window.Height;
toolbar_open = 0
default_layout();
recalc_dimensions();
bw = B.width;
bh = B.height;
bx = B.width;
by = wh - ANIM_BUT.height / 3 - 4;
if (panel !=5) {DEF_check();}
};
// ================================================== //
function on_mouse_move(x, y) {
buttons_on_mouse_move(x, y);
}
//==================================================// lbtn_down
function on_mouse_lbtn_down(x, y) {
buttons_on_mouse_lbtn_down(x, y);
};
// ================================================== // lbtn_up
function on_mouse_lbtn_up(x, y) {
a = 1;
lbtn_down = false;
buttons_on_mouse_lbtn_up(x, y);
}
// ================================================== //
function on_mouse_leave() {
m_t = window.GetProperty("Mouse_touch")
buttons_on_mouse_leave();
}
// ================================================== //
function on_playback_pause(state) {
recalc_dimensions();
}
function check_btns(){
btn_type = window.GetProperty("SYS.Button Folder");
if(utils.ReadINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder') != btn_type){
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', btn_type);
btn_switch_timer = window.CreateTimerInterval(btn_switch_prop);
};
};
//====================================================== ANIM
function move_panel() {
if (toolbar_open) {
};
else {};
n_panel = panel;
n_ww = ww;
c_ww = ww;
if ((dir_move == "right"&panel !=5) ? n_x = 0 - n_ww : n_x = c_ww);
move = true;
toolbar_open = 0
window.Repaint();
pss.GetPanel(n_panel).Show();
timer_anim = window.CreateTimerInterval(a_timer);
}
//=======================================================/
function on_timer(id) {
//====================ANIM
if (timer_anim && id == timer_anim.ID) {
if (animation_status = window.GetProperty("SYS.Animation_status") == true) {
pss.GetPanel(0).Show(false)
if (move) {
a_timer = anim_time_step;
step_c = anim_step;
step_n = anim_step;
if (dir_move == "left") {
c_x = c_x - step_c;
n_x = n_x - step_n;
}
if (dir_move == "right") {
c_x = c_x + step_c;
n_x = n_x + step_n;
}
window.RepaintRect(0, y, ww, wh - y - bh - 5);
pss.GetPanel(c_panel).Move(c_x, y, ww, wh - y - bh - 5, true);
pss.GetPanel(n_panel).Move(n_x, y, n_ww, wh - y - bh - 5 , true);
if (dir_move == "right" ? n_x >= 0 : n_x <= 0) {
pss.GetPanel(c_panel).Show(false);
c_panel = n_panel;
c_x = 0;
n_x = 0;
timer_anim.Dispose();
CollectGarbage();
move = false;
}
window.SetProperty("SYS.panel", panel);
}
} else {
if (move) {
window.RepaintRect(0, y, ww, wh - y - bh - 5 );
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh - 5 , true);
pss.GetPanel(n_panel).Move(0, y, ww, wh - y - bh - 5 , true);
pss.GetPanel(c_panel).Show(false);
c_panel = n_panel;
c_x = 0;
n_x = 0;
timer_anim.Dispose();
on_size();
CollectGarbage();
move = false;
window.SetProperty("SYS.panel", panel);
if (flag == true) {animation_status = true;
window.SetProperty("SYS.Animation_Status", animation_status)
flag = false}
}
}
}
if (toolbar_timer && id == toolbar_timer.ID) {
if (toolbar_timer) toolbar_timer.Dispose();
if (DEL_Timer) DEL_Timer.Dispose();
if (VU_Timer) VU_Timer.Dispose();
SYS_check()
toolbar_open = 0
if (toolbar_timer) toolbar_timer.Dispose();
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh-5 , true)
window.RepaintRect(0, wh - bh*2 - 4, ww , bh*2);
recalc_dimensions();
//DEF_check();
}
if (click_timer && id == click_timer.ID) {
click_timer.Dispose();
fb.RunMainMenuCommand("View/Show now playing in playlist");
}
if (TAB_Timer&&id==TAB_Timer.ID){
SYS_check();
swbt = 3;
recalc_dimensions();
window.RepaintRect(0, wh - bh - 4, ww , bh);
}
if (Milk_Timer&&id==Milk_Timer.ID){
if (Milk_Timer) Milk_Timer.Dispose();
try {
WshShell.Run(".\\Emul\\" + "MilEs.exe");
} catch(e) {};
pss.GetPanel(3).Show(false);
milk_btn = false
//window.SetProperty("SYS.Toolbar_status",toolbar_open);
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh-5 , true)
swbt = 2
DEF_check()
recalc_dimensions()
window.RepaintRect(0, wh - bh - 4, ww , bh);
}
if (NOW_Timer&&id==NOW_Timer.ID){
if (NOW_Timer) NOW_Timer.Dispose();
NOW_Timer = false ;
}
if (DEL_Timer&&id==DEL_Timer.ID){
SYS_check();
DEL_btn = window.GetProperty("SYS.DEL_buttons_status")
//toolbar_open = window.GetProperty("SYS.Toolbar_status");
recalc_dimensions();
CollectGarbage();
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh - 5 , true);
window.Repaint();
}
if (VU_Timer&&id==VU_Timer.ID){
VU_Timer.Dispose();
pss.GetPanel(6).Show(false);
pss.GetPanel(7).Show(false);
pss.GetPanel(0).Show(false)
window.SetProperty("SYS.VU_buttons_status", false);
VU_btn = window.GetProperty("SYS.VU_buttons_status")
window.SetProperty("SYS.Channel spectrum panel_status", false);
recalc_dimensions();
window.RepaintRect(0, wh - bh - 4, ww , bh);
}
if (window.GetProperty("VU buttons auto hide") == true) {
if (VU_set_off = utils.ReadINI( set_path + 'settings.ini', 'VU', 'VU_off')==1){
vu_switch_check()
}
}
// ============= vu switch2 interval
if (utils.ReadINI( set_path + 'settings.ini', 'VU', 'VU_off')==2){
CollectGarbage();
vu_switch_check2()
}
// ============= lib
if (utils.ReadINI( set_path + 'settings.ini', 'lib', 'lib_off')==1){
utils.WriteINI( set_path + 'settings.ini', 'lib', 'lib_off', 0 );
if (autolibtopl) {
pss.GetPanel(0).Show(false)
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh - 5 , true);
if (animation_status) {
animation_status = false;
window.SetProperty("SYS.Animation_Status", animation_status);
flag = true
}
SYS_check() ;
DEF_check()
pss.GetPanel(0).Show(false) ;
pss.GetPanel(c_panel).Show();
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh - 5, true);
panel = 5;
dir_move = panel > old_panel ? "right" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
try {
WshShell.Run(".\\Emul\\" + "click.exe");
} catch(e) {}
}
SYS_check()
}
recalc_dimensions();
window.RepaintRect(0, wh - bh - 4, ww , bh);
swbt = 3;
}
// ============= vu switch2 interval
if (utils.ReadINI( set_path + 'settings.ini', 'milk', 'milk_off')==1){
milk_switch_check();
}
// ============= dsp switch interval
if (utils.ReadINI( set_path + 'settings.ini', 'dsp', 'dsp_off')==1){
dsp_switch_check();
}
// ============= del switch interval
if (utils.ReadINI( set_path + 'settings.ini', 'del', 'del_off')==1){
del_switch_check();
};
if (click_timer && id == click_timer.ID) {
click_timer.Dispose();
fb.RunMainMenuCommand("View/Show now playing in playlist");
}
if (btn_switch_timer && id == btn_switch_timer.ID) {
btn_switch_timer.Dispose();
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
};
}
// ================================================== // Double Click btn changer ;)
function on_mouse_lbtn_dblclk(x, y) {
}
// ================================================== //
function on_mouse_rbtn_down(x, y) {
}
// ================================================== //
function on_mouse_rbtn_up (x, y){
MF_SEPARATOR = 0x00000800;
MF_ENABLED = 0x00000000;
MF_GRAYED = 0x00000001;
MF_DISABLED = 0x00000002;
MF_UNCHECKED = 0x00000000;
MF_CHECKED = 0x00000008;
MF_STRING = 0x00000000;
MF_POPUP = 0x00000010;
MF_MENUBARBREAK = 0x00000020;
MF_MENUBREAK = 0x00000040;
var _menu = window.CreatePopupMenu();
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_1" ? MF_CHECKED : MF_ENABLED;
_menu.AppendMenuItem(btn_type, 1, "Small • << My >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_2" ? MF_CHECKED : MF_ENABLED;
_menu.AppendMenuItem(btn_type, 2, "Small • << Dark >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_3" ? MF_CHECKED : MF_ENABLED;
_menu.AppendMenuItem(btn_type, 3, "Small • << Silver >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_4" ? MF_CHECKED: MF_ENABLED;
_menu.AppendMenuItem(btn_type, 4, "Small • << Classic >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_5" ? MF_CHECKED : MF_ENABLED;
_menu.AppendMenuItem(btn_type, 5, "Middle • << My >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_6" ? MF_CHECKED : MF_ENABLED;
_menu.AppendMenuItem(btn_type, 6, "Middle • << Dark >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_7" ? MF_CHECKED : MF_ENABLED;
_menu.AppendMenuItem(btn_type, 7, "Middle • << Silver >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_8" ? MF_CHECKED : MF_ENABLED;
_menu.AppendMenuItem(btn_type, 8, "Middle • << Classic >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_9" ? MF_CHECKED : MF_ENABLED;
_menu.AppendMenuItem(btn_type, 9, "Big • << My >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_10" ? MF_CHECKED: MF_ENABLED;
_menu.AppendMenuItem(btn_type, 10, "Big • << Dark >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_11" ? MF_CHECKED : MF_ENABLED;
_menu.AppendMenuItem(btn_type, 11, "Big • << Silver >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
var btn_type = window.GetProperty("SYS.Button Folder") == "btn_set_12" ? MF_CHECKED: MF_ENABLED;
_menu.AppendMenuItem(btn_type, 12, "Big • << Classic >>");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
autolibtopl = window.GetProperty("Auto Library to Playlist") == true ? MF_CHECKED: MF_ENABLED;
_menu.AppendMenuItem(autolibtopl, 15, "Auto Go to Playlist [Library] ");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
m_t = window.GetProperty("Mouse_touch") == 1 ? MF_CHECKED: MF_ENABLED;
_menu.AppendMenuItem(m_t, 16, "Touch • ON");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
animation_status = window.GetProperty("SYS.Animation_Status") == true ? MF_CHECKED : MF_ENABLED;
_menu.AppendMenuItem(animation_status, 17, " Animation Main Panels • ON");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
sw_vu = window.GetProperty("VU buttons auto hide") == true ? MF_CHECKED : MF_ENABLED;
_menu.AppendMenuItem(sw_vu, 18, "VU Buttons Auto Hide • ON");
_menu.AppendMenuItem(MF_SEPARATOR, 0, 0);
_menu.AppendMenuItem(MF_ENABLED, 20, "Properties");
_menu.AppendMenuItem(MF_ENABLED, 30, "Configure ...");
ret = _menu.TrackPopupMenu(x,y);
switch (ret) {
case 1:
window.SetProperty("SYS.Button Folder", "btn_set_1");
window.NotifyOthers("SYS.Button Folder", "btn_set_1");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_1');
};
catch (e) {};
on_size();
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 2:
window.SetProperty("SYS.Button Folder", "btn_set_2");
window.NotifyOthers("SYS.Button Folder", "btn_set_2");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_2');
};
catch (e) {};
//on_size();
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 3:
window.SetProperty("SYS.Button Folder", "btn_set_3");
window.NotifyOthers("SYS.Button Folder", "btn_set_3");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_3');
};
catch (e) {};
//on_size();
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 4:
window.SetProperty("SYS.Button Folder", "btn_set_4");
window.NotifyOthers("SYS.Button Folder", "btn_set_4");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_4');
};
catch (e) {};
//on_size();
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 5:
window.SetProperty("SYS.Button Folder", "btn_set_5");
window.NotifyOthers("SYS.Button Folder", "btn_set_5");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_5');
};
catch (e) {};
//on_size();
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 6:
window.SetProperty("SYS.Button Folder", "btn_set_6");
window.NotifyOthers("SYS.Button Folder", "btn_set_6");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_6');
};
catch (e) {};
//on_size();
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 7:
window.SetProperty("SYS.Button Folder", "btn_set_7");
window.NotifyOthers("SYS.Button Folder", "btn_set_7");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_7');
};
catch (e) {};
//on_size();
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 8:
window.SetProperty("SYS.Button Folder", "btn_set_8");
window.NotifyOthers("SYS.Button Folder", "btn_set_8");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_8');
};
catch (e) {};
//on_size();
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 9:
window.SetProperty("SYS.Button Folder", "btn_set_9");
window.NotifyOthers("SYS.Button Folder", "btn_set_9");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_9');
};
catch (e) {};
//on_size();
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 10:
window.SetProperty("SYS.Button Folder", "btn_set_10");
window.NotifyOthers("SYS.Button Folder", "btn_set_10");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_10');
};
catch (e) {};
//on_size();
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 11:
window.SetProperty("SYS.Button Folder", "btn_set_11");
window.NotifyOthers("SYS.Button Folder", "btn_set_11");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_11');
};
catch (e) {};
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 12:
window.SetProperty("SYS.Button Folder", "btn_set_12");
window.NotifyOthers("SYS.Button Folder", "btn_set_12");
try {
utils.WriteINI(set_path + 'settings.ini', 'Button Folder', 'Button Folder', 'btn_set_12');
};
catch (e) {};
try {
fb.RunMainMenuCommand("File/Restart");
};
catch (e) {};
break;
case 15:
autolibtopl = !autolibtopl
window.SetProperty("Auto Library to Playlist", autolibtopl )
break;
case 16:
m_t = window.GetProperty("Mouse_touch")
m_t ==1 ? m_t = 2 : m_t = 1
window.SetProperty("Mouse_touch",m_t )
try {
utils.WriteINI(set_path + 'settings.ini', 'Mouse_touch', 'set', m_t );
};
catch (e) {};
rbtn_up = true
break;
case 17:
animation_status = !animation_status;
window.SetProperty("SYS.Animation_status", animation_status);
m_t = window.GetProperty("Mouse_touch")
rbtn_up = true
break;
case 18:
sw_vu = !sw_vu
window.SetProperty("VU buttons auto hide", sw_vu)
m_t = window.GetProperty("Mouse_touch")
rbtn_up = true
break;
case 20:
window.ShowProperties();
break;
case 30:
window.ShowConfigure();
break;
}
_menu.Dispose();
return true;
}
//==================================================== On key down
function on_key_down(vkey) {
var mask = GetKeyboardMask();
if(vkey== VK_SPACEBAR) {
if (animation_status) {
animation_status = false;
window.SetProperty("SYS.Animation_Status", animation_status);
flag = true
}
toolbar_open=0
if (toolbar_timer) toolbar_timer.Dispose();
pss.GetPanel(0).Show(false)
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh-5 , true)
panel = 5;
dir_move = panel > old_panel ? "right" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
swbt = 3;
SYS_check()
recalc_dimensions()
window.RepaintRect(0, wh - bh - 4, ww , bh);
window.NotifyOthers("SYS.Butt_tool", "tool")
}
// if (mask == KMask.ctrlalt) {
if(vkey==VK_NUMPAD9) {
SYS_check()
swvk++;
if (swvk> 5)
swvk=1
window.SetProperty("swvk", swvk);
if (swvk == 1) {
panel = 5; /*PANEL: [lib]*/
dir_move = panel > old_panel ? "right" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
swbt = 3
window.Repaint();
}
if (swvk == 2) {
panel = 9; /*PANEL: [alb_library]*/
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
swbt= 1
}
if (swvk == 3) {
panel = 15; /*PANEL: [ArtSplitter]*/
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
swbt = 2
}
if (swvk == 4) {
pss.GetPanel(15).Show(false);
pss.GetPanel(6).Move(bw*3, wh-bh-4, ww-bw*6, bh-2,true);
pss.GetPanel(6).Show(true);
pss.GetPanel(7).Move(0, wh - bh - 5, ww , bh, true);
pss.GetPanel(7).Show(true);
panel = 8;
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
if (sw_vu = window.GetProperty("VU buttons auto hide") == true) {
VU_Timer = window.CreateTimerInterval(VU_prop);
}
swbt = 3
}
if (swvk == 5) {
panel = 16
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
}
if (panel == 16 ){
pss.GetPanel(2).Show(true); /*PANEL: [lib_buttons]*/
pss.GetPanel(2).Move(ww - bw, wh / 2-bh*2, ww, bh * 3, true);
swbt = 2;
} else {pss.GetPanel(2).Show(false); /*PANEL: [lib_buttons]*/
}
window.SetProperty("swbt", swbt);
window.SetProperty("swvk", swvk);
recalc_dimensions();
window.RepaintRect(0, wh - bh - 4, ww , bh);
}
// ===========================================
// if (mask == KMask.ctrlalt) {
if(vkey== VK_NUMPAD0) {
SYS_check()
swvk --
if (swvk < 1)
swvk=5
window.SetProperty("swvk", swvk);
if (swvk == 1) {
panel = 5; /*PANEL: [lib]*/
dir_move = panel > old_panel ? "right" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
swbt=3
window.Repaint();
}
if (swvk == 2) {
panel = 9; /*PANEL: [alb_library]*/
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
swbt = 1
}
if (swvk == 3) {
panel = 15;
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
swbt = 2
}
if (swvk == 4) {
pss.GetPanel(15).Show(false);
pss.GetPanel(6).Move(bw*3, wh-bh-4, ww-bw*6, bh-2,true);
pss.GetPanel(6).Show(true);
pss.GetPanel(7).Move(0, wh - bh - 5, ww , bh, true);
pss.GetPanel(7).Show(true);
panel = 8;
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
if (sw_vu = window.GetProperty("VU buttons auto hide") == true) {
VU_Timer = window.CreateTimerInterval(VU_prop);
}
swbt = 3
}
if (swvk == 5) {
panel = 16
dir_move = panel > old_panel ? "left" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
}
//on_size();
if (panel == 16 ){
pss.GetPanel(2).Show(true); /*PANEL: [lib_buttons]*/
pss.GetPanel(2).Move(ww - bw, wh / 2-bh*2, ww, bh * 3, true);
swbt = 2;
} else {pss.GetPanel(2).Show(false); /*PANEL: [lib_buttons]*/
}
window.SetProperty("swbt", swbt);
window.SetProperty("swvk", swvk);
recalc_dimensions();
window.RepaintRect(0, wh - bh - 4, ww , bh);
};
}
function on_notify_data(name, info) {
if(name == "DEF_check" ) {
DEF_check()
}
}
function del_switch_check(){
if (DEL_Timer) DEL_Timer.Dispose();
DEL_Timer = window.CreateTimerInterval(DEL_prop);
utils.WriteINI( set_path + 'settings.ini', 'del', 'del_off',0)
}
function milk_switch_check(){
if (Milk_Timer) Milk_Timer.Dispose();
Milk_Timer = window.CreateTimerInterval(Milk_prop);
utils.WriteINI( set_path + 'settings.ini', 'milk', 'milk_off',0)
}
function tab_switch_check(){
if (TAB_Timer) TAB_Timer.Dispose();
window.SetProperty("SYS.Man Switch", 0);
swbt = 3;
recalc_dimensions();
window.RepaintRect(0, wh - bh - 5, ww , bh);
utils.WriteINI( set_path + 'settings.ini', 'close_man', 'man_off', 0);
}
function tab_switch_check2(){
if (TAB_Timer) TAB_Timer.Dispose();
TAB_Timer = window.CreateTimerInterval(TAB_prop);
utils.WriteINI( set_path + 'settings.ini', 'time_man', 'man_off', 0);
}
function vu_switch_check(){
if (VU_Timer) VU_Timer.Dispose();
if (sw_vu = window.GetProperty("VU buttons auto hide") == true) {
VU_Timer = window.CreateTimerInterval(VU_prop);
}
utils.WriteINI( set_path + 'settings.ini', 'VU', 'VU_off',0)
}
function vu_switch_check2(){
SYS_check();
pss.GetPanel(0).Show(false)
pss.GetPanel(6).Show(false);
pss.GetPanel(7).Show(false);
window.SetProperty("SYS.Channel spectrum panel_status", false);
window.SetProperty("SYS.VU_buttons_status", false)
toolbar_open = 0
//window.SetProperty("SYS.Toolbar_status", toolbar_open);
pss.GetPanel(c_panel).Move(0, y, ww, wh - y - bh - 5 , true);
utils.WriteINI( set_path + 'settings.ini', 'VU', 'VU_off',0)
};
function SYS_check(){
q = window.GetProperty("swsq");
if (utils.ReadINI(set_path + 'settings.ini', 'lib_panel', 'lib_panel')== 1){
utils.WriteINI(set_path + 'settings.ini', 'lib_panel', 'lib_panel', 16);
}
toolbar_open = 0
DEL_btn = false
lib_btn = false
if (DEL_Timer) DEL_Timer.Dispose();
if (toolbar_timer) toolbar_timer.Dispose();
if (VU_Timer) VU_Timer.Dispose();
pss.GetPanel(0).Show(false);
pss.GetPanel(1).Show(false);
if (panel != 16 ){
pss.GetPanel(2).Show(false);
}
pss.GetPanel(3).Show(false)
pss.GetPanel(4).Show(false);
pss.GetPanel(6).Show(false);
pss.GetPanel(7).Show(false);
SEARCH = false
window.SetProperty("SYS.SEARCH_panel_status", SEARCH)
}
function DEF_check(){
q = window.GetProperty("swsq");
if (q == 0) {window.NotifyOthers("SYS.Butt_state", "dn");
}
if (q == 1) {window.NotifyOthers("SYS.Butt_state", "wt");
}
if (q == 2) {window.NotifyOthers("SYS.Butt_state", "up");
};
}
function dsp_switch_check(){
if (utils.ReadINI( set_path + 'settings.ini', 'dsp', 'dsp_off')==1){
swbt = 3
panel = 5;
dir_move = panel > old_panel ? "right" : "right";
if (old_panel != panel) {
move_panel();
old_panel = panel
}
DEF_check()
utils.WriteINI(set_path + 'settings.ini', 'dsp', 'dsp_off', 0);
try {
WshShell.Run(".\\Emul\\" + "click.exe");
} catch(e) {}
}
recalc_dimensions()
window.RepaintRect(0, wh - bh - 4, ww , bh);
}
check_btns();
Ïîñëåäíèé ðàç ðåäàêòèðîâàëîñü seriousstas; 04.12.2016 â 03:17.
|