home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hentai 69
/
HENTAI69.iso
/
Extra
/
MPSetup.exe
/
1033
/
RCDATA
/
CABINET
/
wmploc.DLL
/
256
/
MAINAPPSKIN.JS
< prev
next >
Wrap
Text File
|
2002-12-14
|
20KB
|
516 lines
var g_kTaskBarWidth = 84;
var g_kTaskBtnNowPlayingCaption_offsetTop = 5; // left="20"
var g_kTaskBtnMediaGuideCaption_offsetTop = 45; // left="30"
var g_kTaskBtnCDAudioCaption_offsetTop = 85; // left="11"
var g_kTaskBtnMediaLibraryCaption_offsetTop = 125; // left="23"
var g_kTaskBtnRadioTunerCaption_offsetTop = 165; // left="29"
var g_kTaskBtnPortableDeviceCaption_offsetTop = 205; // left="14"
var g_kTaskBtnSubscriptionsCaption_offsetTop = 245; // left="14"
var g_kTaskBtnSkinChooserCaption_offsetTop = 285; // left="15"
var g_previousContrastMode="";
var g_tracktimeTextWidth=-1;
var g_fGoingDown = true;
var g_kAnimationSpeed = 25;
var g_kBigButtonCover = 436;
var g_kSmallButtonCover = g_kBigButtonCover - g_kTaskBarWidth;
var g_ButtonCover = app.taskbarVisible ? g_kBigButtonCover : g_kSmallButtonCover;
var g_LastVolume = -1;
function ColorSetting(hue,sat)
{
this.hue=hue;
this.sat=sat;
}
var g_rgColorPresets = new Array
(
//====================================================================
/* HUE SATURATION || TITLE */
//====================================================================
new ColorSetting(0, 1), // defaultblue
new ColorSetting(330, 0.491124272346497), // teal_new
new ColorSetting(330, 1), // teal_current
new ColorSetting(300, 0.491124272346497), // seagreen_new
new ColorSetting(300, 1), // seagreen_current
new ColorSetting(240, 0.491124272346497), // green_new
new ColorSetting(240, 1), // green_current
new ColorSetting(210, 0.491124272346497), // xpolive
new ColorSetting(210, 1), // olive_current
new ColorSetting(180, 0.272189348936081), // putty
new ColorSetting(180, 1), // brown_current
new ColorSetting(171.48, 1.84), // orange
new ColorSetting(150, 0.491124272346497), // bronze_new
new ColorSetting(150, 1), // bronze_current
new ColorSetting(120, 1), // red_current
new ColorSetting(90, 1), // magenta_current
new ColorSetting(60, 0.461538463830948), // violet_new
new ColorSetting(60, 1), // violet_current
new ColorSetting(30, 0.467455625534058), // purple_new
new ColorSetting(30, 1.0), // purple_current
new ColorSetting(0, 0.0), // grey
new ColorSetting(0, 0.272189348936081), // xpsilver
new ColorSetting(0, 0.491124272346497) // blue
);
var g_nCurrentColorPreset=parseInt(theme.loadPreference("CurrentColorPreset"));
function CycleColors(interval)
{
if ( isNaN( g_nCurrentColorPreset ) )
{
g_nCurrentColorPreset=0;
}
else
{
g_nCurrentColorPreset = (g_nCurrentColorPreset+interval)%g_rgColorPresets.length;
}
mediacenter.backHueShift = g_rgColorPresets[g_nCurrentColorPreset].hue;
mediacenter.backSaturation = g_rgColorPresets[g_nCurrentColorPreset].sat;
}
function InitNewControls()
{
var cm = mediacenter.contrastMode;
if ( (cm=="WB") || (cm=="BW") )
{
var IDB_APPAUTOHIDEBTN_BW =1902;
var IDB_APPEQBTN_BW =1904;
var IDB_APPPLAYLISTBTN_BW =1906;
var IDB_APPSHUFFLEBTN_BW =1908;
var IDB_BTNGROUP_BW =1910;
var IDB_FASTFORWARD_BTN_BW =1912;
var IDB_REWIND_BTN_BW =1914;
var IDB_MINCLOSE_BTNGRP_BW =1916;
var IDB_MUTE_BTN_BW =1918;
var IDB_PLAY_BTN_BW =1920;
var IDB_PLAY_PAUSE_BTN_BW =1922;
var IDB_RESIZE_BW =1924;
var IDB_SEEK_SLDR_BKG_BW =1926;
var IDB_SOUND_BTN_BW =1928;
var IDB_STOP_BTN_BW =1930;
var IDB_TASKBAR_HANDLE_CLOSE_BW =1932;
var IDB_TASKBAR_HANDLE_OPEN_BW =1934;
var IDB_TASKBTNSCROLLDOWN_BW =1936;
var IDB_VOL_SLDR_FORE_BW =1942;
var IDB_TASKBAR_BUTTONGROUP_HOVER_BW =1950;
var IDB_TASKBAR_BUTTONGROUP_UP_BW =1948;
var IDB_SEEK_THUMB_BW =1683;
var IDB_OLDSTRBMP_VOL_THUMB_BW =1978;
var IDB_RESTOREDOWN_BW =2054;
var IDB_OLDSTRBMP_PLAY_PAUSE_BTN_BW =1922;
var IDB_SKINMODE_HUESHIFT_BW =2075;
var IDB_DROPDOWN_BG_BW =2160;
var IDB_DROPDOWN_ICON_BW =2162;
// The resource IDs for the high contrast images are set up so that if the black on white
// version has an ID of N, the white on black has an ID of N+1
//
// "BW" means Black-on-White, which means we want to use the base resource ID (offset=0)
// "WB" means White-on-Black, which means we want to increment the BW resource ID by one (offset=1)
var offset = (cm=="BW") ? 0 : 1;
var inverseOffset = (offset==0) ? 1 : 0;
if (""==g_previousContrastMode)
{
CacheImage("TaskBarButtons.image");
CacheImage("TaskBarButtons.downImage");
CacheImage("TaskBarButtons.hoverImage");
//CacheImage("taskbar_handle.hoverDownImage"); ??
}
SetAllButtonImages("autohide", "res://wmploc/#" + (IDB_APPAUTOHIDEBTN_BW+inverseOffset));
autohide.image= "res://wmploc/#" + (IDB_APPAUTOHIDEBTN_BW+offset);
SetAllButtonImages("shufflegroup", "res://wmploc/#" + (IDB_APPSHUFFLEBTN_BW+inverseOffset));
shufflegroup.image= "res://wmploc/#" + (IDB_APPSHUFFLEBTN_BW+offset);
SetAllButtonImages("TransportButtongroup", "res://wmploc/#" + (IDB_BTNGROUP_BW+inverseOffset));
TransportButtongroup.image= "res://wmploc/#" + (IDB_BTNGROUP_BW+offset);
TransportButtongroup.disabledImage= "res://wmploc/#" + (IDB_BTNGROUP_BW+offset);
SetAllButtonImages("PauseButtonGroup", "res://wmploc/#" + (IDB_OLDSTRBMP_PLAY_PAUSE_BTN_BW+inverseOffset));
PauseButtonGroup.image= "res://wmploc/#" + (IDB_OLDSTRBMP_PLAY_PAUSE_BTN_BW+offset);
SetAllButtonImages("ffwdGroup", "res://wmploc/#" + (IDB_FASTFORWARD_BTN_BW+inverseOffset));
ffwdGroup.image= "res://wmploc/#" + (IDB_FASTFORWARD_BTN_BW+offset);
SetAllButtonImages("rewGroup", "res://wmploc/#" + (IDB_REWIND_BTN_BW+inverseOffset));
rewGroup.image= "res://wmploc/#" + (IDB_REWIND_BTN_BW+offset);
SetAllButtonImages("btngrpMinClose", "res://wmploc/#" + (IDB_MINCLOSE_BTNGRP_BW+inverseOffset));
btngrpMinClose.image= "res://wmploc/#" + (IDB_MINCLOSE_BTNGRP_BW+offset);
SetAllButtonImages("btngrpRestore", "res://wmploc/#" + (IDB_RESTOREDOWN_BW+offset));
SetAllButtonImages("btnResizeHide", "res://wmploc/#" + (IDB_RESIZE_BW+offset));
SetAllButtonImages("btnResizeShow", "res://wmploc/#" + (IDB_RESIZE_BW+offset));
btnResizeShow.transparencyColor="#FF00ff";
if(""==g_previousContrastMode)
{
CacheImage("seek.foregroundImage");
CacheImage("seek.backgroundImage");
CacheImage("seek.thumbImage");
CacheImage("seek.thumbHoverImage");
CacheImage("seek.thumbDownImage");
CacheImage("volume.foregroundImage");
CacheImage("volume.thumbImage");
CacheImage("volume.thumbHoverImage");
CacheImage("volume.thumbDownImage");
CacheImage("Playlist_Drop_Down.dropDownImage");
CacheImage("Playlist_Drop_Down.dropDownBackgroundImage");
}
seek.foregroundImage = "res://wmploc/#" + (IDB_SEEK_SLDR_BKG_BW+offset);
seek.backgroundImage = "res://wmploc/#" + (IDB_SEEK_SLDR_BKG_BW+offset);
seek.thumbImage = "res://wmploc/#" + (IDB_SEEK_THUMB_BW+offset);
seek.thumbHoverImage = "res://wmploc/#" + (IDB_SEEK_THUMB_BW+inverseOffset);
seek.thumbDownImage = "res://wmploc/#" + (IDB_SEEK_THUMB_BW+inverseOffset);
volume.foregroundImage = "res://wmploc/#" + (IDB_VOL_SLDR_FORE_BW+offset);
volume.thumbImage = "res://wmploc/#" + (IDB_OLDSTRBMP_VOL_THUMB_BW+offset);
volume.thumbHoverImage = "res://wmploc/#" + (IDB_OLDSTRBMP_VOL_THUMB_BW+inverseOffset);
volume.thumbDownImage = "res://wmploc/#" + (IDB_OLDSTRBMP_VOL_THUMB_BW+inverseOffset);
Playlist_Drop_Down.dropDownBackgroundImage = "res://wmploc/#" + (IDB_DROPDOWN_BG_BW+offset);;
Playlist_Drop_Down.dropDownImage = "res://wmploc/#" + (IDB_DROPDOWN_ICON_BW+offset);
SetAllButtonImages("taskbar_handle", "res://wmploc/#" + (IDB_TASKBAR_HANDLE_OPEN_BW+offset));
taskbar_handle.downImage = "res://wmploc/#" + (IDB_TASKBAR_HANDLE_CLOSE_BW+offset);
taskbar_handle.hoverDownImage = "res://wmploc/#" + (IDB_TASKBAR_HANDLE_CLOSE_BW+offset);
SetAllButtonImages("MoreButton", "res://wmploc/#" + (IDB_TASKBTNSCROLLDOWN_BW+offset));
SetAllButtonImages("TaskBarButtons", "res://wmploc/#" + (IDB_TASKBAR_BUTTONGROUP_HOVER_BW+offset));
TaskBarButtons.image = "res://wmploc/#" + (IDB_TASKBAR_BUTTONGROUP_UP_BW+offset);
SetAllButtonImages("CornerButtons", "res://wmploc/#" + (2046+inverseOffset));
CornerButtons.image ="res://wmploc/#" + (2046+offset);
taskBtnNowPlayingCaption.foregroundColor = (cm=="BW") ? "black" : "white";
}
else
{
if (g_previousContrastMode!="")
{
UnCacheAllImages();
}
btnResizeShow.transparencyColor="";
taskBtnNowPlayingCaption.foregroundColor = getDarkTextColor();
}
// Not sure about exposing this just yet leave it commented out until we get a ruling
// If enabled, verify app start up perf regressions before checking in the enabled code
// If XP or better and DVD is available update the TaskButton
//
/* if(false && player.dvd.isAvailable("dvddecoder"))
{
taskBtnCDAudioCaption.value="res://wmploc/RT_STRING/#1279";
taskBtnCDAudio.accKeyboardShortcut="res://wmploc/RT_STRING/#2114";
taskBtnCDAudio.upToolTip="res://wmploc/RT_STRING/#1280";
taskBtnCDAudio.downToolTip="res://wmploc/RT_STRING/#1280";
taskBtnCDAudio.accName="res://wmploc/RT_STRING/#2162";
}
*/
g_previousContrastMode=cm;
btnShuffle.down = player.settings.getMode( 'shuffle' );
g_bufferingProgress = player.network.bufferingProgress;
if (app.titleBarVisible)
{
btngrpMinClose.alphablend = 0;
}
OnOpenStateChangeTransport(player.openState);
OnPlayStateChangeTransport(player.playState);
OnStatusChangeTransport(player.status);
player.settings.mute = (theme.loadPreference("mute")=="True");
}
function LayoutMarquee()
{
if ( (g_tracktimeTextWidth!=-1) && (g_tracktimeTextWidth == tracktime.textwidth)) return;
g_tracktimeTextWidth = tracktime.textwidth;
var marqueeSize = svMarquee.width - 2;
var margin=parseInt(theme.loadString("res://wmploc/RT_STRING/#1272"));
tracktime.horizontalAlignment='left';
tracktime.left = marqueeSize - tracktime.textwidth;
tracktime.horizontalAlignment='right';
running_background_plugins.horizontalAlignment='left';
running_background_plugins.left = marqueeSize - tracktime.textwidth - margin - running_background_plugins.width;
running_background_plugins.horizontalAlignment='right';
metadata.width = marqueeSize - tracktime.textwidth - margin - running_background_plugins.width - margin - metadata.left;
}
function SetAllButtonImages(btn,imagename)
{
try
{
var actualButton = eval(btn);
if (""==g_previousContrastMode)
{
CacheImage(btn + ".image");
CacheImage(btn + ".downImage");
CacheImage(btn + ".hoverImage");
CacheImage(btn + ".disabledImage");
CacheImage(btn + ".hoverDownImage");
}
actualButton.image=imagename;
actualButton.downImage=imagename;
actualButton.hoverImage=imagename;
actualButton.disabledImage=imagename;
actualButton.hoverDownImage=imagename;
}
catch(err){}
}
function SetAllSliderImages(sldr, bkg, thumb)
{
var actualSlider = eval(sldr);
if (""==g_previousContrastMode)
{
CacheImage(sldr + ".backgroundImage");
CacheImage(sldr + ".foregroundImage");
CacheImage(sldr + ".thumbImage");
CacheImage(sldr + ".thumbHoverImage");
CacheImage(sldr + ".thumbDownImage");
}
actualSlider.backgroundImage = bkg;
actualSlider.foregroundImage = bkg;
actualSlider.thumbImage = thumb;
actualSlider.thumbHoverImage = thumb;
actualSlider.thumbDownImage = thumb;
}
var g_ArrayOfAllImages = new Array();
function CacheImage(imageID)
{
g_ArrayOfAllImages[imageID] = eval(imageID);
}
function UnCacheAllImages()
{
for (var img in g_ArrayOfAllImages)
{
eval(img + ' = g_ArrayOfAllImages[img]');
}
g_ArrayOfAllImages.length=0;
}
function currentTaskChange()
{
var btnDown = null;
switch(app.currentTask)
{
case 'NowPlaying':
btnDown = taskBtnNowPlaying;
break;
case 'MediaGuide':
ShowLoadingText();
btnDown = taskBtnMediaGuide;
break;
case 'CDAudio':
btnDown = taskBtnCDAudio;
break;
case 'MediaLibrary':
btnDown = taskBtnMediaLibrary;
break;
case 'RadioTuner':
ShowLoadingText();
btnDown = taskBtnRadioTuner;
break;
case 'PortableDevice':
btnDown = taskBtnPortableDevice;
break;
case 'Services':
btnDown = taskBtnSubscriptions;
break;
case 'SkinViewer':
btnDown = taskBtnSkinChooser;
break;
}
taskBtnNowPlaying.down = false;
taskBtnMediaGuide.down = false;
taskBtnCDAudio.down = false;
taskBtnMediaLibrary.down = false;
taskBtnRadioTuner.down = false;
taskBtnPortableDevice.down = false;
taskBtnSubscriptions.down = false;
taskBtnSkinChooser.down = false;
if (btnDown)
{
btnDown.down = true;
}
}
function ShowLoadingText()
{
LoadingTxt.alphaBlend=0;
LoadingTxt.alphaBlendTo(0xff,4500);
}
function SetTaskBarVisible(bVisible)
{
var Sign = bVisible ? -1 : 1;
var OldWidth = view.width;
svEntireApp.horizontalAlignment="right";
TaskBarVisibleMaster.visible = bVisible;
if(bVisible)
{
taskbar_handle.accName="res://wmploc.dll/RT_STRING/#2151";
}
else
{
taskbar_handle.accName="res://wmploc.dll/RT_STRING/#2152";
}
g_ButtonCover = bVisible ? g_kBigButtonCover : g_kSmallButtonCover;
app.adjustLeft( Sign * g_kTaskBarWidth );
var MoveDist = Sign * (OldWidth - view.width);
if (MoveDist < g_kTaskBarWidth)
{
svEntireApp.width += Sign * (g_kTaskBarWidth - MoveDist);
}
svEntireApp.horizontalAlignment="stretch";
autohide2.tabStop=!bVisible;
autohide.tabStop=bVisible;
}
function CheckShowCloseMinimizeButtons()
{
return (!app.titleBarVisible);
}
function UpdateTitleBarRelatedUI()
{
var showMinCloseButtons = CheckShowCloseMinimizeButtons();
if (btnMinimize.enabled != showMinCloseButtons)
{
btnMinimize.enabled = showMinCloseButtons;
if (showMinCloseButtons) btngrpMinClose.visible = true;
btngrpMinClose.alphaBlendTo(showMinCloseButtons ? 0xff : 0, 330);
}
if (app.titleBarVisible)
{
appautohidebtn.accName="res://wmploc.dll/RT_STRING/#2155";
}
else
{
appautohidebtn.accName="res://wmploc.dll/RT_STRING/#2156";
}
}
/*
function InitNewBuyMe()
{
var BuyBMP = mediacenter.getNamedString("BuyMusicButton");
var BuyURL = mediacenter.getNamedString("BuyMusicURL");
if (BuyBMP != "" && BuyURL != "")
{
buyme.Image = 'BuyMusicButton';
buyme.visible = true;
}
}
*/
function ShowPlayMenu()
{
mnuPlay.show("Play");
}
function UpdateTextColors()
{
metadata.foregroundColor=getHighlightTextColor();
var cm = mediacenter.contrastMode;
if ("BW"==cm) taskBtnNowPlayingCaption.foregroundColor = "#000000";
else if ("WB"==cm) taskBtnNowPlayingCaption.foregroundColor = "#FFFFFF";
else taskBtnNowPlayingCaption.foregroundColor = getDarkTextColor();
}
function dummybutton()
{
this.down = false;
}
//main app and fullscreen have new super ffwd buttons (ffwd_multi), but they need
//a dummy button to keep transport.js from freaking out
var ffwd = new dummybutton();
function ShowTaskMenu(menu)
{
menu.deleteAllItems();
menu.appendItem(0,"res://wmploc/RT_STRING/#2141");
menu.appendItem(1,"res://wmploc/RT_STRING/#2142");
menu.appendItem(2,"res://wmploc/RT_STRING/#2143");
menu.appendItem(3,"res://wmploc/RT_STRING/#2144");
menu.appendItem(4,"res://wmploc/RT_STRING/#2145");
menu.appendItem(5,"res://wmploc/RT_STRING/#2146");
menu.appendItem(6,"res://wmploc/RT_STRING/#2147");
menu.appendItem(7,"res://wmploc/RT_STRING/#2157");
var sel = menu.show();
switch (sel)
{
case 0:
app.currentTask = 'NowPlaying';
break;
case 1:
app.currentTask = 'MediaGuide';
break;
case 2:
app.currentTask = 'CDAudio';
break;
case 3:
app.currentTask = 'MediaLibrary';
break;
case 4:
app.currentTask = 'RadioTuner';
break;
case 5:
app.currentTask = 'PortableDevice';
break;
case 6:
app.currentTask = 'Services';
break;
case 7:
app.currentTask = 'SkinViewer';
break;
default:
break;
}
}
function SaveSettings()
{
theme.savePreference('mute',player.settings.mute);
if(false==isNaN(g_nCurrentColorPreset))
{
theme.savePreference('CurrentColorPreset',g_nCurrentColorPreset);
}
}
function TransportMenu(event)
{
if ( (event.clientX < (TransportSubview.left+TransportSubview.width))
&& (event.clientY > (TransportSubview.top)) )
{
mnuPlay2.top=(event.clientY-TransportSubview.top);
if (app.taskBarVisible)
{
mnuPlay2.left=event.clientX-g_kTaskBarWidth;
}
else
{
mnuPlay2.left=event.clientX;
}
mnuPlay2.show('play');
}
}