home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CyberMycha 2003 October
/
cmycha200310.iso
/
NHL2004
/
NHL2004Demo.exe
/
fe
/
nhl
/
js
/
sound_options_interface.js
< prev
next >
Wrap
Text File
|
2003-08-20
|
4KB
|
169 lines
//Copyright (c) 2002 Electronic Arts Inc. All rights reserved.
var oAudioInterface = oGameFace.AudioInterface;
var aComboBox = null;
var aAudioDetail = new Array();
var aSpeakers = new Array();
var aGameMusic = new Array();
//main init function
function initSettings()
{
if (!oLeagueFace.ProviderInterface.IsInSetup())
{
oLeagueFace.ProviderInterface.EnterSetup();
}
aComboBox = new ComboBox("drpAudioDetail", 680, 232, 170, 19, 80, "divAudioDetail");
aComboBox = new ComboBox("drpSpeakers", 210, 232, 170, 19, 60, "divSpeakers");
aComboBox = new ComboBox("drpGameMusic", 240, 232, 170, 19, 80, "divGameMusic");
//initToggle( tglColorCommentary_off );
//initToggle( tglColorCommentary_on );
//init game interface
oCallbackTable = new CallbackTableObject();
initGameInterface( oCallbackTable );
initMusicVolume();
initSFXVolume();
initCrowdVolume();
initPlayByPlayVolume();
initGameSpeechVolume();
//initColorCommentary();
initAudioDetail();
initSpeakers();
initGameMusic();
}
function canExitScreen()
{
removeCallbackTable();
return true;
}
function clearSettings()
{
}
function initMusicVolume()
{
oCallbackTable.MusicVolumeChanged();
}
function initSFXVolume()
{
oCallbackTable.SFXVolumeChanged();
}
function initCrowdVolume()
{
oCallbackTable.CrowdVolumeChanged();
}
function initPlayByPlayVolume()
{
oCallbackTable.PlayByPlayVolumeChanged();
}
function initGameSpeechVolume()
{
oCallbackTable.SpeechVolumeChanged();
}
function initColorCommentary()
{
oCallbackTable.ColorCommentaryChanged();
}
function initAudioDetail()
{
//drpAudioDetail.AppendOptions( new Array( nhlMsg('LOW_FEMSING') , nhlMsg('MEDIUM_FEMSING') , nhlMsg('HIGH_FEMSING') ));
drpAudioDetail.ClearAll();
drpAudioDetail.AddString(nhlMsg('LOW_FEMSING'));
drpAudioDetail.AddString(nhlMsg('MEDIUM_FEMSING'));
drpAudioDetail.AddString(nhlMsg('HIGH_FEMSING'));
oCallbackTable.AudioDetailChanged();
}
function initSpeakers()
{
//drpSpeakers.AppendOptions( new Array( '2' , '4'));
drpSpeakers.ClearAll();
drpSpeakers.AddString(nhlMsg('2'));
drpSpeakers.AddString(nhlMsg('4'));
oCallbackTable.SpeakersChanged();
}
function initGameMusic()
{
//drpGameMusic.AppendOptions( new Array( nhlMsg('DEFAULT') , nhlMsg('IMPORTED') , nhlMsg('DEFAULT_IMPORTED') ));
drpGameMusic.ClearAll();
drpGameMusic.AddString(nhlMsg('DEFAULT'));
drpGameMusic.AddString(nhlMsg('IMPORTED'));
drpGameMusic.AddString(nhlMsg('DEFAULT_IMPORTED'));
oCallbackTable.InGameMusicChanged();
}
function changeMusicVolume()
{
oGameData.MusicVolume = sldMusicVolume.value;
}
function changeSFXVolume()
{
oGameData.SFXVolume = sldSFXVolume.value;
}
function changeCrowdVolume()
{
oGameData.CrowdVolume = sldCrowdVolume.value;
}
function changePlayByPlayVolume()
{
oGameData.PlayByPlayVolume = sldPlayByPlayVolume.value;
}
function changeSpeechVolume()
{
oGameData.SpeechVolume = sldSpeechVolume.value;
}
function changeColorCommentary( oTgl )
{
oAudioInterface.PlayToggleSFX();
oGameData.ColorCommentary = oTgl.selected;
}
function changeAudioDetail()
{
oGameData.AudioDetail = drpAudioDetail.Selected;
}
function changeSpeakers()
{
oGameData.Speakers = drpSpeakers.Selected;
}
function changeGameMusic()
{
oGameData.InGameMusic = drpGameMusic.Selected;
}
function CallbackTableObject()
{
this.MusicVolumeChanged = function(){sldMusicVolume.SetValue( oGameData.MusicVolume );};
this.SFXVolumeChanged = function() {sldSFXVolume.SetValue( oGameData.SFXVolume );};
this.CrowdVolumeChanged = function () {sldCrowdVolume.SetValue( oGameData.CrowdVolume );};
this.PlayByPlayVolumeChanged = function () {sldPlayByPlayVolume.SetValue( oGameData.PlayByPlayVolume );};
this.SpeechVolumeChanged = function () {sldSpeechVolume.SetValue( oGameData.SpeechVolume); };
//this.ColorCommentaryChanged = function () { (oGameData.ColorCommentary) ? doSwap( tglColorCommentary_on ) : doSwap( tglColorCommentary_off ); };
this.AudioDetailChanged = function () {drpAudioDetail.Selected = oGameData.AudioDetail; };
this.SpeakersChanged = function () {drpSpeakers.Selected = oGameData.Speakers; };
this.InGameMusicChanged = function () {drpGameMusic.Selected = oGameData.InGameMusic; };
}