2alexmat
Xchange Settings > правая кнопка Splitter Settings > WSH Settings > 5я строка var max_wp_size_autorized = {w:1280, h:800};
Список разделов › foobar2000 › Сборки › Частные конфигурации
//=================================================// Images directory
var bt_dir = fb.FoobarPath+"skins\\xchange\\bt\\";
//=================================================// Tools
function RGB(r, g, b) {
return (0xff000000 | (r << 16) | (g << 8) | (b));
}
var PlaybackOrder = {
Default: 0,
RepeatPlaylist: 1,
RepeatTrack: 2,
Random: 3,
ShuffleTracks: 4,
ShuffleAlbums: 5,
ShuffleFolders: 6
}
//=================================================// OBJECT button
button = function () {
this._attrb = {};
this.create = function (path_normal, path_hover, path_down) {
this._attrb.normal = gdi.Image(path_normal);
this._attrb.hover = gdi.Image(path_hover);
this._attrb.down= gdi.Image(path_down);
if (typeof this._attrb.x == "undefined") this._attrb.x= 0;
if (typeof this._attrb.y == "undefined") this._attrb.y= 0;
this._attrb.w = this._attrb.normal.Width;
this._attrb.h= this._attrb.normal.Height;
if (typeof this._attrb.state == "undefined") this._attrb.state=0;
}
this.draw = function (gr, bx, by, alpha) {
var image;
this._attrb.x = bx;
this._attrb.y = by;
switch(this._attrb.state)
{
case 0:
image = this._attrb.normal;
break;
case 1:
image = this._attrb.hover;
break;
case 2:
image = this._attrb.down;
break;
}
gr.DrawImage(image, bx, by, this._attrb.w, this._attrb.h, 0, 0, this._attrb.w, this._attrb.h, 0, alpha);
}
this.checkstate = function (action, x, y) {
switch(action)
{
case "down":
if (x>this._attrb.x && x<this._attrb.x+this._attrb.w && y>this._attrb.y && y<this._attrb.y+this._attrb.h)
{
this._attrb.state=2;
window.Repaint();
} else if (this._attrb.state==2){
this._attrb.state=0;
window.Repaint();
}
break;
case "move":
if (x>this._attrb.x && x<this._attrb.x+this._attrb.w && y>this._attrb.y && y<this._attrb.y+this._attrb.h)
{
this._attrb.state=1;
window.Repaint();
} else if (this._attrb.state==1){
this._attrb.state=0;
window.Repaint();
}
break;
case "up":
if (x>this._attrb.x && x<this._attrb.x+this._attrb.w && y>this._attrb.y && y<this._attrb.y+this._attrb.h)
{
this._attrb.state=1;
} else {
this._attrb.state=0;
}
break;
}
return this._attrb.state;
}
}
//=================================================// generate new OBJECTs
var bouton01 = new button;
var bouton02 = new button;
var bouton03 = new button;
var bouton04 = new button;
var bouton05 = new button;
var bouton06 = new button;
var bouton07 = new button;
//=================================================// Global Variables
var ButtonStates = {normal: 0,hover: 1,down: 2};
var ww;
var wh;
//==========================================================================/ on_paint
function on_paint(gr){
if(ww>155) {
//draw button 01
bouton01.draw(gr,0,0,225);
//draw button 02
bouton02.draw(gr,24,0,225);
//draw button 03
bouton03.draw(gr,48,0,225);
//draw button 04
bouton04.draw(gr,72,0,225);
//draw button 05
bouton05.draw(gr,96,0,225);
//draw button 06
bouton06.draw(gr,120,0,225);
//draw button 07
bouton07.draw(gr,144,0,225);
} else {
//draw button 04
bouton04.draw(gr,0,0,225);
//draw button 05
bouton05.draw(gr,24,0,225);
//draw button 06
bouton06.draw(gr,48,0,225);
//draw button 07
bouton07.draw(gr,72,0,225);
}
}
//==========================================================================/ on_size
function on_size() {
ww = window.Width;
wh = window.Height;
bouton01.create(bt_dir+"note0.png", bt_dir+"note1.png", bt_dir+"note1.png");
bouton05.create(bt_dir+"bt_prev0.png", bt_dir+"bt_prev1.png", bt_dir+"bt_prev1.png");
bouton07.create(bt_dir+"bt_next0.png", bt_dir+"bt_next1.png", bt_dir+"bt_next1.png");
switch(fb.PlaybackOrder)
{
case 0:
bouton03.create(bt_dir+"po_default0.png", bt_dir+"po_default1.png", bt_dir+"po_default1.png");
break;
case 1:
bouton03.create(bt_dir+"po_repeat_pl0.png", bt_dir+"po_repeat_pl1.png", bt_dir+"po_repeat_pl1.png");
break;
case 2:
bouton03.create(bt_dir+"po_repeat0.png", bt_dir+"po_repeat1.png", bt_dir+"po_repeat1.png");
break;
case 3:
bouton03.create(bt_dir+"po_random0.png", bt_dir+"po_random1.png", bt_dir+"po_random1.png");
break;
case 4:
bouton03.create(bt_dir+"po_shuffle0.png", bt_dir+"po_shuffle1.png", bt_dir+"po_shuffle1.png");
break;
case 5:
bouton03.create(bt_dir+"po_shuffle_al0.png", bt_dir+"po_shuffle_al1.png", bt_dir+"po_shuffle_al1.png");
break;
case 6:
bouton03.create(bt_dir+"po_shuffle_fo0.png", bt_dir+"po_shuffle_fo1.png", bt_dir+"po_shuffle_fo1.png");
break;
}
check_all_buttons();
}
//==========================================================================/ lbtn_down
function on_mouse_lbtn_down(x,y){
var state;
if (bouton01.checkstate("down",x,y)==ButtonStates.down) {
fb.RunMainMenuCommand("View/ELPlaylist/Show now playing");
fb.RunMainMenuCommand("View/Columns playlist/Activate now playing");
}
if (bouton02.checkstate("down",x,y)==ButtonStates.down) {
fb.RunMainMenuCommand("Playback/Stop After Current");
check_all_buttons();
}
if (bouton03.checkstate("down",x,y)==ButtonStates.down) {
fb.PlaybackOrder = (fb.PlaybackOrder>5)?0:fb.PlaybackOrder+1;
check_all_buttons();
}
if (bouton04.checkstate("down",x,y)==ButtonStates.down) {
if(fb.IsPlaying) {
fb.Stop();
} else {
fb.RunMainMenuCommand("File/Open...");
}
check_all_buttons();
}
if (bouton05.checkstate("down",x,y)==ButtonStates.down) {
fb.Prev();
}
if (bouton06.checkstate("down",x,y)==ButtonStates.down) {
fb.PlayOrPause();
check_all_buttons();
}
if (bouton07.checkstate("down",x,y)==ButtonStates.down) {
fb.Next();
}
// window.Repaint();
}
//==========================================================================/ lbtn_up
function on_mouse_lbtn_up(x,y) {
bouton01.checkstate("up",x,y);
bouton02.checkstate("up",x,y);
bouton03.checkstate("up",x,y);
bouton04.checkstate("up",x,y);
bouton05.checkstate("up",x,y);
bouton06.checkstate("up",x,y);
bouton07.checkstate("up",x,y);
window.Repaint();
}
//==========================================================================/ mouse_move
function on_mouse_move(x,y) {
bouton01.checkstate("move",x,y);
bouton02.checkstate("move",x,y);
bouton03.checkstate("move",x,y);
bouton04.checkstate("move",x,y);
bouton05.checkstate("move",x,y);
bouton06.checkstate("move",x,y);
bouton07.checkstate("move",x,y);
// window.Repaint();
}
//==========================================================================/ mouse_leave
function on_mouse_leave() {
bouton01.checkstate("up",0,0);
bouton02.checkstate("up",0,0);
bouton03.checkstate("up",0,0);
bouton04.checkstate("up",0,0);
bouton05.checkstate("up",0,0);
bouton06.checkstate("up",0,0);
bouton07.checkstate("up",0,0);
window.Repaint();
}
function on_mouse_wheel(delta) {
}
//==========================================================================/ check all buttons
function check_all_buttons() {
if(fb.StopAfterCurrent) {
bouton02.create(bt_dir+"stopafter0.png", bt_dir+"stopafter1.png", bt_dir+"stopafter1.png");
} else {
bouton02.create(bt_dir+"stopafter2.png", bt_dir+"stopafter3.png", bt_dir+"stopafter3.png");
}
if(fb.IsPlaying) {
bouton04.create(bt_dir+"stop0.png", bt_dir+"stop1.png", bt_dir+"stop1.png");
} else {
bouton04.create(bt_dir+"open0.png", bt_dir+"open1.png", bt_dir+"open1.png");
}
if(fb.IsPlaying && !fb.IsPaused) {
bouton06.create(bt_dir+"bt_pause0.png", bt_dir+"bt_pause1.png", bt_dir+"bt_pause1.png");
}
else {
bouton06.create(bt_dir+"bt_play0.png", bt_dir+"bt_play1.png", bt_dir+"bt_play1.png");
}
}
// ================================================================================/ playback_time (every sec.)
function on_playback_time(time) {
if(fb.IsPlaying && !fb.IsPaused) {
bouton06.create(bt_dir+"bt_pause0.png", bt_dir+"bt_pause1.png", bt_dir+"bt_pause1.png");
}
else {
bouton06.create(bt_dir+"bt_play0.png", bt_dir+"bt_play1.png", bt_dir+"bt_play1.png");
}
window.Repaint();
}
// ================================================================================/ playback_oreder_changed
function on_playback_order_changed(new_order_index) {
switch(fb.PlaybackOrder)
{
case 0:
bouton03.create(bt_dir+"po_default0.png", bt_dir+"po_default1.png", bt_dir+"po_default1.png");
break;
case 1:
bouton03.create(bt_dir+"po_repeat_pl0.png", bt_dir+"po_repeat_pl1.png", bt_dir+"po_repeat_pl1.png");
break;
case 2:
bouton03.create(bt_dir+"po_repeat0.png", bt_dir+"po_repeat1.png", bt_dir+"po_repeat1.png");
break;
case 3:
bouton03.create(bt_dir+"po_random0.png", bt_dir+"po_random1.png", bt_dir+"po_random1.png");
break;
case 4:
bouton03.create(bt_dir+"po_shuffle0.png", bt_dir+"po_shuffle1.png", bt_dir+"po_shuffle1.png");
break;
case 5:
bouton03.create(bt_dir+"po_shuffle_al0.png", bt_dir+"po_shuffle_al1.png", bt_dir+"po_shuffle_al1.png");
break;
case 6:
bouton03.create(bt_dir+"po_shuffle_fo0.png", bt_dir+"po_shuffle_fo1.png", bt_dir+"po_shuffle_fo1.png");
break;
}
window.Repaint();
}
// ================================================================================/ playback_stop
function on_playback_stop()
{
check_all_buttons();
window.Repaint();
}
// ================================================================================/ playback_pause
function on_playback_pause(state)
{
check_all_buttons();
window.Repaint();
}
// ================================================================================/ playback_starting
function on_playback_starting(cmd, is_paused)
{
check_all_buttons();
window.Repaint();
}
// ================================================================================/ on_playlist_stop_after_current_changed
function on_playlist_stop_after_current_changed(state) {
check_all_buttons();
window.Repaint();
}
=hybridfan Jul 24, 2009, 3:15:22 PM
Is that a new vis I see a dancing girl?
~Br3tt Jul 24, 2009, 3:41:51 PM
yes, new panel (WSH) where i've coded an animation, a dancing girl :p
you can set the fps with a scrollbar, just try!
Что означает, что после каждого обновления следует удалить все из папки .../xchange/settings/!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
After each new install (newer version of Xchange)
you have to delete all the settings files from the .../xchange/settings/ folder
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Вернуться в Частные конфигурации