
<?macrodef default_sort_entry
	<window name="$(name)_label" type="textdisplay" offset="$(number_offset)" alignment="0,0,0,0" transparent="true" >
		<property font_color="0xFFFFFFFF" />
		<script name="OnInit"> SetText("$(label)"); </script>
	</window>
	<window name="$(name)_sort" transparent="true" type="picker" offset="$(field_offset)" alignment="0,0,0,0" hitstyle="ACTIVE">
		<property textshadow="false" font_color1="#000000" font_color2="#FFFFFF" font_color3="#FFFFFF" fade_duration="0"/>
		<imagestyle name="img_item_only" transparent="false"> <color_fill alignment="entire" color="0xFF8080FF" /> </imagestyle>
		<imagestyle name="img_item_first" transparent="false">	<color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
		<imagestyle name="img_item_middle" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
		<imagestyle name="img_item_last" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>

		<script name="OnInit"> 
			SetAllItems( { { Text: parent.nocolumn, Data: "none" }, 
				{ Text: parent.filename, Data: "filename" }, 
				{ Text: parent.tracktitle, Data: "title" } ,
				{ Text: parent.artist, Data: "artist" } ,
				{ Text: parent.album, Data: "album" } ,
				{ Text: parent.tracknumber, Data: "track" } ,
				{ Text: parent.genre, Data: "genre" } ,
				{ Text: parent.author, Data: "author" } ,
				{ Text: parent.year , Data: "year" }, 
				{ Text: parent.duration , Data: "time" }, 
				{ Text: parent.extension , Data: "extension" } } );
		</script>
	</window>
	<window name="$(name)_direction" transparent="true" type="picker" offset="$(direction_offset)" alignment="0,0,0,0" hitstyle="ACTIVE">
		<property textshadow="false" font_color1="#000000" font_color2="#FFFFFF" font_color3="#FFFFFF" fade_duration="0"/>
		<imagestyle name="img_item_only" transparent="false"> <color_fill alignment="entire" color="0xFF8080FF" /> </imagestyle>
		<imagestyle name="img_item_first" transparent="false">	<color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
		<imagestyle name="img_item_middle" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
		<imagestyle name="img_item_last" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>

		<property font_color="0xFFFFFFFF" />
		<script name="OnInit">
			SetAllItems( { { Text: :language.Translate("settings/playlist.ascending") , Data: "forwards" }, 
				{ Text: :language.Translate("settings/playlist.descending"), Data: "reverse" }	} );
		</script>
	</window>
?>




<?mml version="0.6" ?>
<mml>
	<interface unique_name= "teamsonique/sonique2_prefs/1.0" >
		
		<FontStyle name="headerfont" size="+5" style="normal" />

<!-- start noSettings dialog -->
		<window  name="noSettings" offset="0,0,0,200" alignment="0,0,1,0" transparent="true" >
			<imagestyle name="background"> <color_rect color="0xFFFFFFFF" alignment="entire" blendmode="COPY|RGB" />	</imagestyle>
			<window name="text" transparent="true" type="textdisplay" offset="10,10,-10,28" alignment="0,0,1,0"  >
				<property 
					font_style="headerfont" 
					font_color="SQ2_Color4" 
				/>
				<script name="OnInit">
					SetText(:language.Translate("settings/no.settings"));
				</script>
			</window>
		</window>
<!-- end noSettings dialog -->

<!-- start filetypes prefs dialog -->
		<window  name="fileTypesPrefs"  alignment="entire" transparent="true" >
			<imagestyle name="background"> <color_rect color="0xFFFFFFFF" alignment="entire" blendmode="COPY|RGB" />	</imagestyle>
			<window offset="20,14,-10,28" alignment="0,0,1,0" type="textdisplay" name="filetypestitle" transparent="true">
				<script name="OnInit"> SetText(:language.Translate("settings/filetypes.associatedfiles")); </script>
				<property font_color="0xFF9FFFFF" />
			</window>

			<window type="button" offset="20,30,35,44" alignment="0,0,0,0" name="cdautoplay" transparent="true" hitstyle="ACTIVE">
				<property hover="true"/>
				<imagestyle name="state0">
					<include source="MML_Mood_DlgCheckBoxState0" />
				</imagestyle>
				<imagestyle name="state1">
					<include source="MML_Mood_DlgCheckBoxState1" />
				</imagestyle>
				<script name="OnInit">
					SetToggle(true);
					if( :sonique.prefs.GetString("misc", "cdautoplay") ) {
						SetButtonState( 1 );
						:sonique.SetCdAutoPlay( 1 );
					} else {
						SetButtonState( 0 );
						:sonique.SetCdAutoPlay( 0 );
					}
				</script>
				<script name="OnClick">
					:sonique.SetCdAutoPlay( GetButtonState() );
					:sonique.prefs.CreateSection("misc");
					:sonique.prefs.SetString("misc", "cdautoplay", GetButtonState() );
				</script>

			</window>
			
			<window offset="40,30,40,48" alignment="0,0,1,0" type="textdisplay" name="cdautoplay_text" transparent="true">
				<script name="OnInit"> SetText("Auto Start CD"); </script>
				<property font_color="0xFF9FFFFF" />
			</window>

			<window type="SelectionList" offset="10,60,-10,-10" alignment="0,0,1,1" transparent="false" >
				<imagestyle name="background" transparent="false">
					<color_fill alignment="entire" color="0xFF808080" />
				</imagestyle>
				<imagestyle name="img_item_off" transparent="false">
					<color_fill alignment="entire" color="0xFF008080" />
					<color_fill state="HOVER" alignment="entire" color="0x800000F0" />
					<color_fill state="HIT" alignment="entire" color="0x8080F0F0" />
				</imagestyle>
				<imagestyle name="img_item_on" transparent="false">
					<color_fill alignment="entire" color="0xFF808080" />
					<color_fill state="HOVER" alignment="entire" color="0x800080F0" blendmode="COPY|RGB|ALPHA_SRCALPHA" />
					<color_fill state="HIT" alignment="entire" color="0x80F0F0F0" blendmode="COPY|RGB|ALPHA_SRCALPHA" />
				</imagestyle>
				<property font_color1="0xFF00FFFF" />

				<script name="OnInit">
					$exts = :sonique.players.default.GetFileExtensions();
					foreach( $val in $exts )
					{
						$extitems |= { { text: $val["ext"] | " (" | $val["desc"] | ")", data: $val } };
					}
					SetAllItems($extitems);
					$i = 0;
					foreach( $val in $extitems )
					{
						SetIndexSelected( $i, :sonique.files.IsFileAssociationRegistered($val["data"]["ext"]) );
						$i += 1;
					}
				</script>
				<script name="OnItemSelected">
					if( IsIndexSelected($params[0]) )
					{
						:sonique.files.RegisterFileAssociation( GetItem($params[0])["data"]["ext"], "open,add", GetItem($params[0])["data"]["desc"] );
					} else {
						:sonique.files.UnregisterFileAssociation( GetItem($params[0])["data"]["ext"] );
					}
				</script>
			</window>
		</window>
<!-- end filetypes prefs dialog -->

<!-- network prefs dialog -->
		<window  name="networkPrefs" offset="0,0,0,250" alignment="0,0,1,0" transparent="true" >
			<imagestyle name="background"> <color_rect color="0xFFFFFFFF" alignment="entire" blendmode="COPY|RGB" />	</imagestyle>
			<script name="OnInit">
				proxysection = "proxy";
				:sonique.prefs.CreateSection(proxysection);
			</script>
			<window name="filetypestitle" type="textdisplay" offset="10,-14,-10,-28" alignment="0,0,1,0" transparent="true">
			<script name="OnInit"> SetText(:language.Translate("settings/network.proxysettings")); </script>
				<script name="OnIntro"> SetOffset({10,14,-10,28},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-14,-10,-28},0,$params[0],"linear_accel");	</script>
				<property  font_color="0xFF9FFFFF" />
			</window>

			<window name="ProxyCheckbox" type="button" offset="-180,32,0,46" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
				<property hover="true"/>
				<imagestyle name="state0">
					<include source="MML_Mood_DlgCheckBoxState0" />
				</imagestyle>
				<imagestyle name="state1">
					<include source="MML_Mood_DlgCheckBoxState1" />
				</imagestyle>
				<script name="OnIntro"> SetOffset({20,32,34,46},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({-180,32,0,46},0,$params[0],"linear_accel");	</script>
				<script name="OnInit">
					SetToggle(true);
					if( :sonique.prefs.GetString(proxysection, "enabled") )
					{
						SetButtonState(1);
					} else {
						SetButtonState(0);
					}
					UpdateEnabledStates();
				</script>
				<script name="OnClick">
					if( GetButtonState() == 0 )
					{
						:sonique.prefs.SetString(proxysection, "enabled", "false");
					} else {
						:sonique.prefs.SetString(proxysection, "enabled", "true");
					}
					UpdateEnabledStates();
				</script>
				<script name="UpdateEnabledStates">
					$state = GetButtonState();
					if( $state == 0 )
					{
						ProxyAuthCheckbox_title.Disable();
						ProxyURLLabel.Disable();
						ProxyURLEdit.Disable();
						ProxyAuthCheckbox.Disable();
						ProxyNameLabel.Disable();
						ProxyNameEdit.Disable();
						ProxyPassLabel.Disable();
						ProxyPassEdit.Disable();
					} else {
						ProxyAuthCheckbox_title.Enable();
						ProxyURLLabel.Enable();
						ProxyURLEdit.Enable();
						ProxyAuthCheckbox.Enable();
						if( ProxyAuthCheckbox.GetButtonState() == 1 )
						{
							ProxyNameLabel.Enable();
							ProxyNameEdit.Enable();
							ProxyPassLabel.Enable();
							ProxyPassEdit.Enable();
						}
					}
				</script>
			</window>
			<window name="ProxyCheckbox_title" type="textdisplay" offset="-180,32,0,46" alignment="0,0,1,0" transparent="true" >
				<property font_color="0xFFFFFFFF" />
				<script name="OnIntro"> SetOffset({40,34,-10,44},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({-180,32,0,46},0,$params[0],"linear_accel");	</script>
				<script name="OnInit"> SetText(:language.Translate("settings/network.useproxy")); </script>
			</window>


			<window name="ProxyURLLabel" type="textdisplay" offset="-60,50,0,64" alignment="0,0,0,0" transparent="true">
				<script name="OnInit"> SetText(:language.Translate("settings/network.proxyurl")); </script>
				<property  font_color="0xFFFFFFFF" font_justification="left|v_center"/>
				<script name="OnIntro">	SetOffset({40,50,100,64},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-80,50,0,64},0,$params[0],"linear_accel"); </script>
			</window>
			<window name="ProxyURLEdit" type="EditBox" offset="80,-50,-20,-64" alignment="0,0,1,0">
				<script name="OnIntro"> SetOffset({110,50,-10,64},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> Save(); SetOffset({110,-50,-10,64},0,$params[0],"linear_accel"); </script>
				<script name="OnDestroy"> Save(); </script>
				<script name="OnInit">
					SetText( :sonique.prefs.GetString(proxysection, "URL") );
				</script>
				<script name="Save">
					:sonique.prefs.SetString(proxysection, "URL", GetText());
				</script>
				<imagestyle name="background_inactive">
					<color_fill alignment="entire" color="0xFF000080" />
				</imagestyle>
				<imagestyle name="background_active">
					<color_fill alignment="entire" color="0xFF0000FF" />
				</imagestyle>
				<property font_color="0xFFFFFFFF" cursor_on_color="0xFFFFFFFF" cursor_off_color="0x00FFFFFF"/>
			</window>

			<window name="ProxyAuthCheckbox" type="button" offset="-180,70,0,84" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
				<property hover="true"/>
				<imagestyle name="state0"> <include source="MML_Mood_DlgCheckBoxState0" /> </imagestyle>
				<imagestyle name="state1"> <include source="MML_Mood_DlgCheckBoxState1" /> </imagestyle>
				<imagestyle name="background_inactive"> <color_fill alignment="entire" color="0xFF000080" /> </imagestyle>
				<script name="OnIntro"> SetOffset({40,70,54,84},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({-180,70,0,84},0,$params[0],"linear_accel");	</script>
				<script name="OnInit">
					SetToggle(true);
					if( :sonique.prefs.GetString(proxysection, "authenabled") )
					{
						SetButtonState(1);
					} else {
						SetButtonState(0);
					}
					UpdateEnabledStates();
				</script>
				<script name="OnClick">
					if( GetButtonState() == 0 )
					{
						:sonique.prefs.SetString(proxysection, "authenabled", "false");
					} else {
						:sonique.prefs.SetString(proxysection, "authenabled", "true");
					}
					UpdateEnabledStates();
				</script>
				<script name="UpdateEnabledStates">
					$state = GetButtonState();
					if( $state == 0 )
					{
						ProxyNameLabel.Disable();
						ProxyNameEdit.Disable();
						ProxyPassLabel.Disable();
						ProxyPassEdit.Disable();
					} 
					else 
					{
						ProxyNameLabel.Enable();
						ProxyNameEdit.Enable();
						ProxyPassLabel.Enable();
						ProxyPassEdit.Enable();
					}
				</script>
			</window>
			<window name="ProxyAuthCheckbox_title" type="textdisplay" offset="-180,32,0,46" alignment="0,0,1,0" transparent="true" >
				<property font_color="0xFFFFFFFF" />
				<script name="OnIntro"> SetOffset({60,72,220,82},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({-180,70,0,84},0,$params[0],"linear_accel");	</script>
				<script name="OnInit"> SetText(:language.Translate("settings/network.proxyauthentication")); </script>
			</window>

			<window name="ProxyNameLabel" type="textdisplay" offset="-60,88,0,102" alignment="0,0,0,0" transparent="true">
				<script name="OnInit"> SetText(:language.Translate("settings/network.username")); </script>
				<property  font_color="0xFFFFFFFF" font_justification="left|v_center"/>
				<script name="OnIntro">	SetOffset({60,88,120,102},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-80,88,0,102},0,$params[0],"linear_accel"); </script>
			</window>
			<window name="ProxyNameEdit" type="EditBox" offset="80,-88,-20,-102" alignment="0,0,1,0">
				<script name="OnIntro"> SetOffset({130,88,-10,102},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> Save(); SetOffset({80,-88,-20,102},0,$params[0],"linear_accel");</script>
				<script name="OnDestroy"> Save(); </script>
				<script name="OnInit">
					SetText( :sonique.prefs.GetString(proxysection, "AuthName") );
				</script>
				<script name="Save">
					:sonique.prefs.SetString(proxysection, "AuthName", GetText());
				</script>
				<imagestyle name="background_inactive">
					<color_fill alignment="entire" color="0xFF000080" />
				</imagestyle>
				<imagestyle name="background_active">
					<color_fill alignment="entire" color="0xFF0000FF" />
				</imagestyle>
				<property font_color="0xFFFFFFFF" cursor_on_color="0xFFFFFFFF" cursor_off_color="0x00FFFFFF"/>
			</window>

			<window name="ProxyPassLabel" type="textdisplay" offset="-60,106,0,120" alignment="0,0,0,0" transparent="true">
				<script name="OnInit"> SetText(:language.Translate("settings/network.password")); </script>
				<property  font_color="0xFFFFFFFF" font_justification="left|v_center"/>
				<script name="OnIntro">	SetOffset({60,106,120,120},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-80,106,0,120},0,$params[0],"linear_accel"); </script>
			</window>
			<window name="ProxyPassEdit" type="EditBox" offset="80,-106,-20,-120" alignment="0,0,1,0">
				<property font_color="0xFFFFFFFF" cursor_on_color="0xFFFFFFFF" cursor_off_color="0x00FFFFFF" secret="true"/>
				<imagestyle name="background_inactive">	<color_fill alignment="entire" color="0xFF000080" /> </imagestyle>
				<imagestyle name="background_active"> <color_fill alignment="entire" color="0xFF0000FF" /> </imagestyle>
				<script name="OnIntro"> SetOffset({130,106,-10,120},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> Save(); SetOffset({80,-106,-20,120},0,$params[0],"linear_accel");</script>
				<script name="OnDestroy"> Save(); </script>
				<script name="OnInit"> SetText( :sonique.Unscramble(:sonique.prefs.GetString(proxysection, "AuthPassword")) ); </script>
				<script name="Save"> :sonique.prefs.SetString(proxysection, "AuthPassword", :sonique.Scramble(GetText())); </script>
			</window>

			<!-- HTTP misc -->
			<window name="OnlineWindowCheckbox" type="button" offset="10,-93,10,-78" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE">
				<property hover="true"/>
				<imagestyle name="state0"> <include source="MML_Mood_DlgCheckBoxState0" />	</imagestyle>
				<imagestyle name="state1"> <include source="MML_Mood_DlgCheckBoxState1" />	</imagestyle>
				<script name="OnIntro"> SetOffset({10,138,24,152},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-93,-10,78},0,$params[0],"linear_accel");	</script>
				<script name="OnInit">
					SetToggle(true);
					onlinesection = "onlinecontent";
					:sonique.prefs.CreateSection(onlinesection);
					:sonique.prefs.PrepString(onlinesection, "disableonlinecontent", "false"); 
					if( :sonique.prefs.GetString(onlinesection, "disableonlinecontent") )
						{ SetButtonState( 1 ); } 
					else 
						{ SetButtonState( 0 ); }
				</script>
				<script name="OnClick">
					if( GetButtonState() )
					{ 
						:sonique.prefs.SetString(onlinesection, "disableonlinecontent", "true" );
						:sonique.Status(:language.Translate("settings/onlinecontent.disablestatus")); 
					}
					else
					{ 
						:sonique.prefs.SetString(onlinesection, "disableonlinecontent", "false" );
						:sonique.Status(:language.Translate("settings/onlinecontent.enablestatus")); 
					}
				</script>
			</window>
			<window name="OnlineWindow_title" type="textdisplay" offset="10,-93,-10,-78" alignment="0,0,1,0" transparent="true" >
				<script name="OnIntro"> SetOffset({30,138,-10,152},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-113,-10,78},0,$params[0],"linear_accel");	</script>
				<script name="OnInit"> SetText(:language.Translate("settings/onlinecontent.disable")); </script>
				<property font_color="0xFFFFFFFF" />
			</window>
			<window name="LaunchURLCheckbox" type="button" offset="10,-113,10,-98" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE">
				<property hover="true"/>
				<imagestyle name="state0"> <include source="MML_Mood_DlgCheckBoxState0" />	</imagestyle>
				<imagestyle name="state1"> <include source="MML_Mood_DlgCheckBoxState1" />	</imagestyle>
				<script name="OnIntro"> SetOffset({10,158,24,172},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-113,-10,98},0,$params[0],"linear_accel");	</script>
				<script name="OnInit">
					SetToggle(true);
					miscsection = "misc";
					:sonique.prefs.CreateSection(miscsection);
					:sonique.prefs.PrepString(miscsection, "disablelaunchURL", "false"); 
					if( :sonique.prefs.GetString(miscsection, "disablelaunchURL") )
						{ SetButtonState( 1 ); } 
					else 
						{ SetButtonState( 0 ); }
				</script>
				<script name="OnClick">
					:sonique.EnableDithering( GetButtonState() );
					if( GetButtonState() )
					{ 
						:sonique.prefs.SetString(miscsection, "disablelaunchURL", "true" );
						:sonique.Status(:language.Translate("settings/launchurl.disablestatus"));  
					}
					else
					{ 
						:sonique.prefs.SetString(miscsection, "disablelaunchURL", "false" );
						:sonique.Status(:language.Translate("settings/launchurl.enablestatus"));  
					}
				</script>
			</window>
			<window name="LaunchURL_title" type="textdisplay" offset="10,-93,-10,-78" alignment="0,0,1,0" transparent="true" >
				<script name="OnIntro"> SetOffset({30,158,-10,172},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({10,-133,-10,98},0,$params[0],"linear_accel"); </script>
				<script name="OnInit"> SetText(:language.Translate("settings/launchurl.disable")); </script>
				<property font_color="0xFFFFFFFF" />
			</window>
		</window>
<!-- end networkPrefs -->

<!-- visualPrefs prefs dialog -->
		<window  name="visualPrefs"  alignment="entire" transparent="true" >
			<imagestyle name="background"> <color_rect color="0xFFFFFFFF" alignment="entire" blendmode="COPY|RGB" />	</imagestyle>		
			<window name="fullscreendisplaylabel" type="textdisplay" offset="-200,0,0,15" alignment="0,0,0,0" transparent="true">
				<property font_color="0xFFFFFFFF" />
				<script name="OnInit">
					SetText(:language.Translate("settings/visuals.fullscreen"));
				</script>
				<script name="OnIntro"> SetOffset({10,15,220,35},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-200,0,0,15},0,$params[0],"linear_accel"); </script>
			</window>
			<window name="fullscreendevicepicker" type="picker" offset="-200,0,0,15" transparent="false" alignment="0,0,0,0" hitstyle="ACTIVE">
				<property textshadow="false" font_color1="#000000" font_color2="#FFFFFF" font_color3="#FFFFFF" fade_duration="0"/>
				<imagestyle name="img_item_only" transparent="false">
					<color_fill alignment="entire" color="0xFF8080FF" />
				</imagestyle>
				<imagestyle name="img_item_first" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<imagestyle name="img_item_middle" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<imagestyle name="img_item_last" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<script name="OnInit">
					$items = :sonique.visuals.GetDeviceList();
					if ($items.ArraySize() == 1)
					{
						Disable();
					}
					for( $i in 0 to $items.ArraySize()-1 )
					{
						$name = $items[$i]["name"];
						$desc = $items[$i]["description"];
						$guid = $items[$i]["GUID"];
						$items[$i] = { text: $desc, data: { name: $name, GUID: $guid } };
					}
					SetAllItems( $items );
					SetCurrentIndex( 0 );
				</script>
				<script name="OnIntro"> SetOffset({20,38,220,58},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-200,0,0,15},0,$params[0],"linear_accel"); </script>
				<script name="OnItemSelected">
					:sonique.visuals.SetDisplayDevice( GetCurrentItem()["data"]["GUID"] );
				</script>
			</window>


			<window name="posteffectlabel" type="textdisplay" offset="-200,0,0,15" alignment="0,0,0,0" transparent="true">
				<property font_color="0xFFFFFFFF" />
				<script name="OnInit"> SetText(:language.Translate("settings/visuals.posteffects")); </script>
				<script name="OnIntro"> SetOffset({10,65,220,85},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-200,0,0,15},0,$params[0],"linear_accel"); </script>
			</window>
			<window name="posteffectpicker" transparent="true" type="picker" offset="-200,0,0,15" hitstyle="ACTIVE">
				<property textshadow="false" font_color1="#000000" font_color2="#FFFFFF" font_color3="#FFFFFF" fade_duration="0"/>
				<imagestyle name="img_item_only" transparent="false">
					<color_fill alignment="entire" color="0xFF8080FF" />
				</imagestyle>
				<imagestyle name="img_item_first" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<imagestyle name="img_item_middle" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<imagestyle name="img_item_last" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<script name="OnIntro"> SetOffset({20,88,220,108},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({-200,0,0,15},0,$params[0],"linear_accel"); </script>
				<script name="OnInit">
					$items = :sonique.visuals.GetPostEffectList();
					if ($items.ArraySize() == 1)
					{
						Disable();
					}
					for( $i in 0 to $items.ArraySize()-1 )
					{
						$name = $items[$i]["name"];
						$desc = $items[$i]["description"];
						$fid = $items[$i]["factoryID"];
						$items[$i] = { text: $desc, data: { name: $name, fid: $fid } };
					}
					SetAllItems($items);
					SetCurrentIndex(0);

					visualPrefs.UpdateSubWindow();
				</script>
				<script name="OnItemSelected">
					visualPrefs.UpdateSubWindow();
				</script>
			</window>

			<window name="PostEffectCheckBox" type="button" offset="-180,16,0,32" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
				<property hover="true"/>
				<imagestyle name="state0"> <include source="MML_Mood_DlgCheckBoxState0" /> </imagestyle>
				<imagestyle name="state1"> <include source="MML_Mood_DlgCheckBoxState1" /> </imagestyle>
				<script name="OnIntro"> SetOffset({20,120,34,134},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({-180,16,0,32},0,$params[0],"linear_accel"); </script>
				<script name="OnInit">
					SetToggle(true);
					if (:sonique.visuals.GroupIsPostEffectEnabled("default", posteffectpicker.GetCurrentItem()["data"]["fid"]) == true)
					{
						SetButtonState(1);
						parent.subwindow.Enable();
					}
					else
					{
						SetButtonState(0);
						parent.subwindow.Disable();
					}
				</script>
				<script name="OnClick"> 
					:sonique.visuals.GroupEnablePostEffect("default", posteffectpicker.GetCurrentItem()["data"]["fid"], GetButtonState()); 
					if (GetButtonState())
					{
						parent.subwindow.Enable();
					}
					else
					{
						parent.subwindow.Disable();
					}
				</script>
			</window>
			<window name="PostEffectCheckBox_title" type="textdisplay" offset="-180,16,0,32" alignment="0,0,0,0"  transparent="true" >
				<property font_color="0xFFFFFFFF" />
				<script name="OnIntro"> SetOffset({40,120,220,132},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-180,16,0,32},0,$params[0],"linear_accel");	</script>
				<script name="OnInit"> SetText(:language.Translate("settings/visuals.posteffectsenable")); </script>
			</window>

			<script name="OnInit"> currentsubwindow = ""; </script>
			<script name="UpdateSubWindow">
				$which = posteffectpicker.GetCurrentItem()["data"]["name"];
				if( $which == currentsubwindow )
				{
					return;
				}
				$fid = posteffectpicker.GetCurrentItem()["data"]["fid"];

				if( DoesChildExist("subwindow") )
				{
					$duration = GetAnimationDuration();
					subwindow.StartExtro($duration);
					subwindow.DestroyWindow($duration);
				}

				if( !CreateWindow( "Generic", $which, "subwindow", {20,140,-10,-10}, {0,0,1,1}, "true", 0, "false", 0, "true", $fid ) )
				{
					CreateWindow( "Generic", "NoPrefsScreen", "subwindow", {50,140,-10,-10}, {0,0,1,1}, "true", 0, "false", 0, "true" );
				}

				currentsubwindow = $which;
			</script>
		</window>
<!-- end visualPrefs prefs dialog -->

<!-- AudioOut prefs dialog -->
		<window  name="audioOutPrefs" alignment="entire" transparent="true" >
			<imagestyle name="background"> <color_rect color="0xFFFFFFFF" alignment="entire" blendmode="COPY|RGB" />	</imagestyle>
			
			<window name="outputtext" type="textdisplay" offset="-200,0,-100,10" transparent="true" >
				<script name="OnInit">SetText(:language.Translate("settings/audio.outputdevice")); </script>
				<property font_color="SQ2_Mood_text_color_001" />
				<script name="OnIntro"> SetOffset({20,15,220,25},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-200,0,-100,10},0,$params[0],"linear_accel"); </script>
			</window>
			<window name="outputpicker" transparent="true" type="picker" offset="-200,15,-100,30" hitstyle="ACTIVE">
				<property textshadow="false" font_color1="#000000" font_color2="#FFFFFF" font_color3="#FFFFFF" fade_duration="0"/>
				<imagestyle name="img_item_only" transparent="false"> <color_fill alignment="entire" color="0xFF8080FF" /> </imagestyle>
				<imagestyle name="img_item_first" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
				<imagestyle name="img_item_middle" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
				<imagestyle name="img_item_last" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
				<script name="OnIntro"> SetOffset({20,30,220,45},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-200,15,-100,30},0,$params[0],"linear_accel"); </script>
				<script name="OnInit">
					$items = :sonique.players.GetEndpointList();
					$defitem = :sonique.players.GetDefaultEndpoint();
					for( $i in 0 to $items.ArraySize()-1 )
					{
						$name = $items[$i]["name"];
						$desc = $items[$i]["description"];
						$fid = $items[$i]["factoryID"];
						$items[$i] = { text: $desc, data: { name: $name, fid: $fid } };
						if( $defitem == $name )
						{
							$defitemindex = $i;
						}
					}
					SetAllItems( $items );
					SetCurrentIndex( $defitemindex );
					WaveOutHack();

					audioOutPrefs.UpdateSubWindow();
				</script>
				<script name="OnItemSelected">
					audioOutPrefs.UpdateSubWindow();

					:sonique.players.SetDefaultEndpoint( GetItem($params[0])["data"]["name"] );
					WaveOutHack();
				</script>
				<script name="WaveOutHack">
					if( GetCurrentItem()["data"]["name"] == "waveOutOutput" ) {
						if( :sonique.players.default.GetPlaybackMethod()["method"] == "crossfade" ) {
							:sonique.players.default.SetPlaybackMethod("seamless");
							:sonique.Status(:language.Translate("settings/audio.waveoutwarning"));
						}
					}
				</script>
			</window>
			<!-- SUB WINDOW -->
			<script name="OnInit">
				currentsubwindow = "";
			</script>
			<script name="UpdateSubWindow">
				$which = outputpicker.GetCurrentItem()["data"]["name"];
				if( $which == currentsubwindow ) {
					return;
				}
				if( DoesChildExist("subwindow") ) {
					$duration = GetAnimationDuration();
					subwindow.StartExtro($duration);
					subwindow.DestroyWindow($duration);
				}
				$fid = outputpicker.GetCurrentItem()["data"]["fid"];
				if( !CreateWindow( "Generic", $which, "subwindow", {10,50,-10,-10}, {0,0,1,1}, "true", 0, "false", 0, "true", $fid ) ) {
					CreateWindow( "Generic", "NoPrefsScreen", "subwindow", {10,50,-10,-10}, {0,0,1,1}, "true", 0, "false", 0, "true" );
				}
				currentsubwindow = $which;
			</script>
		</window>
<!-- end audioOut prefs -->


<!-- START GENERAL PREFS -->
		<window  name="generalPrefs" offset="0,0,0,300" alignment="0,0,1,0" transparent="true" >
			<imagestyle name="background"> <color_rect color="0xFFFFFFFF" alignment="entire" blendmode="COPY|RGB" />	</imagestyle>
			<!-- LANGUAGE -->
			<!-- jmctodo - this should be a list box, not a picker -->
			<window name="languagepicker" transparent="true" type="picker" offset="10,10,200,30" alignment="0,0,0,0" hitstyle="ACTIVE">
				<imagestyle name="img_item_only" transparent="false"><color_fill alignment="entire" color="0xFF8080FF" /></imagestyle>
				<imagestyle name="img_item_first" transparent="false"><color_fill alignment="entire" color="0xFFFF952A" /></imagestyle>
				<imagestyle name="img_item_middle" transparent="false"><color_fill alignment="entire" color="0xFFFF952A" /></imagestyle>
				<imagestyle name="img_item_last" transparent="false"><color_fill alignment="entire" color="0xFFFF952A" /></imagestyle>
				<script name="OnInit"> 
					langArray = :sonique.GetLanguageList();
					this.SetAllItems(langArray);

					:sonique.prefs.CreateSection("sonique/gui");
					lang = :sonique.prefs.GetString("sonique/gui", "current_language");
					for ($i in 0 to langArray.ArraySize()-1)
					{
						if (lang == langArray[$i]) { this.SetCurrentIndex($i) }
					}
				</script>
				<script name="Apply"> 
					$index = GetCurrentIndex();
					if (lang != langArray[$index]) { :sonique.SetLanguageIndex($index); }
				</script>
				<property textshadow="false" font_color1="#000000" font_color2="#FFFFFF" font_color3="#FFFFFF" fade_duration="0"/>
			</window>
			<window name="applylanguage" type="button" offset="210,10,300,30" alignment="0,0,0,0"  hitstyle="ACTIVE">
				<imagestyle name="state0">
					<color_fill color = "0xFF6060C0" state="normal"/>
					<color_fill color = "0xFF7070D0" state="hover" />
					<color_fill color = "0xFF8080FF" state="hit"   />
				</imagestyle>
				<script name="OnInit"> SetText(:language.Translate("settings/generic.apply")); </script>
				<script name="OnClick"> languagepicker.Apply(); </script>
				<property hoverhint="apply language changes" default_delay="150" text="Apply" font_color = "0xFFFFFFFF"/>
			</window>

			<!-- 24 HOUR -->
			<window name="Clock24Hour_Checkbox" type="button" offset="10,-113,10,-98" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE">
				<property hover="true"/>
				<imagestyle name="state0"> <include source="MML_Mood_DlgCheckBoxState0" />	</imagestyle>
				<imagestyle name="state1"> <include source="MML_Mood_DlgCheckBoxState1" />	</imagestyle>
				<script name="OnIntro"> SetOffset({10,38,24,52},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-113,-10,98},0,$params[0],"linear_accel");	</script>
				<script name="OnInit">
					SetToggle(true);
					helpersection = "sonique/gui/slate/PlayerHelper";
					:sonique.prefs.CreateSection(helpersection);
					:sonique.prefs.PrepString(helpersection, "HourFormat", "24"); 
					if( :sonique.prefs.GetString(helpersection, "HourFormat") == "24" )
						{ SetButtonState( 1 ); } 
					else 
						{ SetButtonState( 0 ); }
				</script>
				<script name="OnClick">
					if( GetButtonState() ) { 
						:sonique.prefs.SetString(helpersection, "HourFormat", "24" );
						:sonique.Status(:language.Translate("settings/clockformat.24"));
					}
					else	{ 
						:sonique.prefs.SetString(helpersection, "HourFormat", "12" );
						:sonique.Status(:language.Translate("settings/clockformat.12"));
					}
				</script>
			</window>
			<window name="Clock24Hour_title" type="textdisplay" offset="10,-93,-10,-78" alignment="0,0,1,0" transparent="true" >
				<script name="OnIntro"> SetOffset({30,38,-10,52},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({10,-133,-10,98},0,$params[0],"linear_accel"); </script>
				<script name="OnInit"> SetText(:language.Translate("settings/clockformat.display24")); </script>
				<property font_color="0xFFFFFFFF" />
			</window>

			<!-- APPEND/REPLACE -->
			<window name="appendpicker" transparent="true" type="picker" offset="10,60,-10,80" alignment="0,0,1,0" hitstyle="ACTIVE">
				<imagestyle name="img_item_only" transparent="false">
					<color_fill alignment="entire" color="0xFF8080FF" />
				</imagestyle>
				<imagestyle name="img_item_first" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<imagestyle name="img_item_middle" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<imagestyle name="img_item_last" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<script name="OnInit"> 
					SetAllItems({:language.Translate("settings/playlist.append"), :language.Translate("settings/playlist.replace")}); 
					playersection = "sonique/player"; 
					:sonique.prefs.CreateSection(playersection); 
				</script>
				<script name="OnIntro"> if( :sonique.prefs.GetString(playersection, "append") ) { SetCurrentIndex(0); } else { SetCurrentIndex(1); } </script>
				<script name="OnItemSelected"> :sonique.prefs.SetString(playersection, "append", 1-$params[0])</script>
				<property textshadow="false" font_color1="#000000" font_color2="#FFFFFF" font_color3="#FFFFFF" fade_duration="0"/>
			</window>
			<!-- PLAYIMMEDIATELY -->
			<window name="playimmediatelypicker" transparent="true" type="picker" offset="10,90,-10,110" alignment="0,0,1,0" hitstyle="ACTIVE">
				<imagestyle name="img_item_only" transparent="false">
					<color_fill alignment="entire" color="0xFF8080FF" />
				</imagestyle>
				<imagestyle name="img_item_first" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<imagestyle name="img_item_middle" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<imagestyle name="img_item_last" transparent="false">
					<color_fill alignment="entire" color="0xFFFF952A" />
				</imagestyle>
				<script name="OnInit"> 
					SetAllItems({:language.Translate("settings/playlist.playondrop"), :language.Translate("settings/playlist.nothingondrop")}); 
					playersection="sonique/player"; 
					:sonique.prefs.CreateSection(playersection); </script>
				<script name="OnIntro"> if( :sonique.prefs.GetString(playersection, "playimmediately") ) { SetCurrentIndex(0); } else { SetCurrentIndex(1); } </script>
				<script name="OnItemSelected"> :sonique.prefs.SetString(playersection, "playimmediately", 1-$params[0])</script>
				<property textshadow="false" font_color1="#000000" font_color2="#FFFFFF" font_color3="#FFFFFF" fade_duration="0"/>
			</window>
			<!-- SAVEPLAYLIST -->
			<!--<window name="SavePlaylist_Checkbox" type="button" offset="10,130,24,144" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
				<property hover="true"/>
				<imagestyle name="state0"><include source="MML_Mood_DlgCheckBoxState0" /></imagestyle>
				<imagestyle name="state1"><include source="MML_Mood_DlgCheckBoxState1" /></imagestyle>
				<script name="OnInit">
					SetToggle(true);
					playlistsection="sonique/PlaylistServer"; 
					:sonique.prefs.CreateSection(playlistsection); 
				</script>
				<script name="OnIntro"> if( :sonique.prefs.GetString(playlistsection, "saveplaylist") ) { SetButtonState(1); } else { SetButtonState(0); } </script>
				<script name="OnClick"> :sonique.prefs.SetString(playlistsection, "saveplaylist", GetButtonState()); </script>
			</window>
			<window name="SavePlaylist_title" type="textdisplay" offset="30,132,-10,142" alignment="0,0,1,0" transparent="true" >
				<property font_color="0xFFFFFFFF" />
				<script name="OnInit">
					SetText(:language.Translate("settings/playlist.saveplaylist"));
				</script>
			</window>-->
			<window type="DlgCheckBox" offset="10,130,300,144" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
				<script name="OnInit"> 
					section="Sonique/PlaylistServer"; :sonique.prefs.CreateSection(section); 
					SetText(:language.Translate("settings/playlist.saveplaylist"));
				</script>
				<script name="OnIntro"> 
					if( :sonique.prefs.GetString(section, "saveplaylist") ) { 
						SetButtonState(1); 
						RememberPosition_Checkbox.Enable();
					} else { 
						SetButtonState(0); 
						RememberPosition_Checkbox.Disable();
					} 
				</script>
				<script name="OnClick"> 
					:sonique.prefs.SetString(section, "saveplaylist", GetButtonState()); 
					if (GetButtonState()) { RememberPosition_Checkbox.Enable(); } else { RememberPosition_Checkbox.Disable(); }
				</script>
			</window>
			<!-- REMEMBER POSITION -->
			<!--<window name="RememberPosition_Checkbox" type="button" offset="10,150,24,164" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
				<property hover="true"/>
				<imagestyle name="state0"><include source="MML_Mood_DlgCheckBoxState0" /></imagestyle>
				<imagestyle name="state1"><include source="MML_Mood_DlgCheckBoxState1" /></imagestyle>
				<script name="OnInit">
					SetToggle(true);
					playlistsection="sonique/PlaylistServer"; 
					:sonique.prefs.CreateSection(playlistsection); 
				</script>
				<script name="OnIntro"> if( :sonique.prefs.GetString(playlistsection, "saveposition") ) { SetButtonState(1); } else { SetButtonState(0); } </script>
				<script name="OnClick"> :sonique.prefs.SetString(playlistsection, "saveposition", GetButtonState()); </script>
			</window>
			<window name="RememberPosition_title" type="textdisplay" offset="30,152,-10,162" alignment="0,0,1,0" transparent="true" >
				<property font_color="0xFFFFFFFF" />
				<script name="OnInit"> SetText(:language.Translate("settings/playlist.saveposition")); </script>
			</window>-->
			<window  name="RememberPosition_Checkbox" type="DlgCheckBox" offset="40,150,300,164" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
				<script name="OnInit"> 
					SetText(:language.Translate("settings/playlist.saveposition")); 
					playlistsection="sonique/PlaylistServer"; 
					:sonique.prefs.CreateSection(playlistsection); 
				</script>
				<script name="OnIntro"> if( :sonique.prefs.GetString(playlistsection, "saveposition") ) { SetButtonState(1); } else { SetButtonState(0); } </script>
				<script name="OnClick"> :sonique.prefs.SetString(playlistsection, "saveposition", GetButtonState()); </script>
			</window>
			<!-- PLAY ON STARTUP -->
			<window name="PlayOnStart_Checkbox" type="button" offset="10,170,24,184" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
				<property hover="true"/>
				<imagestyle name="state0"><include source="MML_Mood_DlgCheckBoxState0" /></imagestyle>
				<imagestyle name="state1"><include source="MML_Mood_DlgCheckBoxState1" /></imagestyle>
				<script name="OnInit">
					SetToggle(true);
					playlistsection="sonique/PlaylistServer"; 
					:sonique.prefs.CreateSection(playlistsection); 
				</script>
				<script name="OnIntro"> if( :sonique.prefs.GetString(playlistsection, "playonstartup") ) { SetButtonState(1); } else { SetButtonState(0); } </script>
				<script name="OnClick"> :sonique.prefs.SetString(playlistsection, "playonstartup", GetButtonState()); </script>
			</window>
			<window name="PlayOnStart_title" type="textdisplay" offset="30,172,-10,182" alignment="0,0,1,0" transparent="true" >
				<property font_color="0xFFFFFFFF" />
				<script name="OnInit"> SetText(:language.Translate("settings/playlist.playonstartup")); </script>
			</window>
			<!-- IDLE SCAN -->
			<window name="idlescanpicker" transparent="true" type="picker" offset="10,190,-10,210" alignment="0,0,1,0" hitstyle="ACTIVE">
				<imagestyle name="img_item_only" transparent="false"> <color_fill alignment="entire" color="0xFF8080FF" /> </imagestyle>
				<imagestyle name="img_item_first" transparent="false">  <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
				<imagestyle name="img_item_middle" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
				<imagestyle name="img_item_last" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
				<script name="OnInit"> 
					SetAllItems({:language.Translate("settings/playlist.noscan"), :language.Translate("settings/playlist.quickscan"), :language.Translate("settings/playlist.thoroughscan")}); 
					playlistsection="sonique/PlaylistServer"; 
					:sonique.prefs.CreateSection(playlistsection); 
				</script>
				<script name="OnIntro">
					:sonique.prefs.PrepString(playlistsection, "idlescan", "quick"); 
					$val = :sonique.prefs.GetString(playlistsection, "idlescan");
					//:console.Echo("OnIntro idlescanpicker: " | $val);
					//:console.Echo( {none: 0, quick: 1, thorough: 2}[$val] );
					SetCurrentIndex({none: 0, quick: 1, thorough: 2}[$val]); 
				</script>
				<script name="OnItemSelected">
					$val = {"none","quick","thorough"}[$params[0]];
					$startScan = true;
					if ($val == "none") {
						$startScan = false;
					}
					//:console.Echo("OnItemSelected idlescanpicker");
					//:console.Echo( $val );
					//:console.Echo( $startScan );
					:sonique.prefs.SetString(playlistsection, "idlescan", $val);
					:sonique.playlists.SetIdleScan($val, $startScan); 
				</script>
				<property textshadow="false" font_color1="#000000" font_color2="#FFFFFF" font_color3="#FFFFFF" fade_duration="0"/>
			</window>
			<!-- PLAYBACK METHOD (TRANSITION) -->	
			<window name="transitiontext" type="textdisplay" offset="-200,45,-100,55" transparent="true" >
				<property font_color="SQ2_Mood_text_color_001" text="Transition Method" />
				<script name="OnIntro"> SetOffset({20,220,220,230},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-200,45,-100,55},0,$params[0],"linear_accel"); </script>
			</window>
			<window name="transitionpicker" transparent="true" type="picker" offset="-200,65,-100,80" hitstyle="ACTIVE">
				<property textshadow="false" font_color1="#000000" font_color2="#FFFFFF" font_color3="#FFFFFF" fade_duration="0"/>
				<imagestyle name="img_item_only" transparent="false"> <color_fill alignment="entire" color="0xFF8080FF" /> </imagestyle>
				<imagestyle name="img_item_first" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
				<imagestyle name="img_item_middle" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
				<imagestyle name="img_item_last" transparent="false"> <color_fill alignment="entire" color="0xFFFF952A" /> </imagestyle>
				<script name="OnIntro"> SetOffset({28,240,220,255},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-200,65,-100,80},0,$params[0],"linear_accel"); </script>
				<script name="OnInit">
					SetAllItems( { { Text: "Normal", Data: "Normal" }, { Text: "Seamless", Data: "Seamless" }, { Text: "Cross-fade", Data: "Crossfade" } } );
					SetCurrentIndex( { normal: 0, seamless: 1, crossfade: 2 }[:sonique.players.default.GetPlaybackMethod()["method"]] );
					UpdateDisplay();
					:sonique.players.default.RegisterCallback("PlaybackMethodChanged","WaveOutHack()", this);
					WaveOutHack();
				</script>
				<script name="OnDestroy">
					:sonique.players.default.UnregisterCallback("PlaybackMethodChanged", this);
				</script>
				<script name="OnItemSelected">
					:sonique.players.default.SetPlaybackMethod(GetItem($params[0])["Data"]);
					UpdateDisplay();
					sldrDelay.OnInit();
				</script>
				<script name="UpdateDisplay">
					$cur = GetCurrentItem()["Data"];
					if( $cur == "Normal" ) {
						delaytitle.Hide();
						delayvalue.Hide();
						sldrDelay.Hide();
					} else {
						if( $cur == "Crossfade" ) {
							delaytitle.SetText(:language.Translate("settings/audio.crossfadetime"));
						} else {
							delaytitle.SetText(:language.Translate("settings/audio.silencebetweentracks"));
						}
						delaytitle.Show();
						delayvalue.Show();
						sldrDelay.Show();
					}
				</script>
				<script name="WaveOutHack">
					if( :sonique.players.GetDefaultEndpoint() == "waveOutOutput" ) {
						if( transitionpicker.GetCurrentItem()["Data"] == "Crossfade" ) {
							transitionpicker.SetCurrentIndex(1);
							transitionpicker.OnItemSelected( transitionpicker.GetCurrentIndex() );
							:sonique.Status(:language.Translate("settings/audio.waveoutwarning"));
						}
						transitionpicker.SetAllItems( { { Text: "Normal", Data: "Normal" }, { Text: "Seamless", Data: "Seamless" } } );
					} else {
						transitionpicker.SetAllItems( { { Text: "Normal", Data: "Normal" }, { Text: "Seamless", Data: "Seamless" }, { Text: "Cross-fade", Data: "Crossfade" } } );
					}
				</script>
			</window>
			<window name="delaytitle" type="textdisplay" offset="-180,90,-80,100" transparent="true" >
				<property font_color="SQ2_Mood_text_color_001" />
				<script name="OnIntro"> SetOffset({40,265,140,275},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-180,90,-80,100},0,$params[0],"linear_accel"); </script>
			</window>
			<window name="delayvalue" type="textdisplay" offset="-70,90,0,100" transparent="true" >
				<property font_color="SQ2_Mood_text_color_001" font_justification="right" text="" />
				<script name="OnIntro"> SetOffset({130,265,200,275},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-70,90,0,100},0,$params[0],"linear_accel"); </script>
			</window>
			<window name="sldrDelay" type="fillbar" offset="-180,110,-80,120" transparent="false"  hitstyle="ACTIVE" >
				<property orientation="left_to_right"/>
				<imagestyle name="barempty"> <color_fill color="0xFF8080FF" alignment="entire"/> </imagestyle>
				<imagestyle name="barfilled"> <color_fill color="0xFF0000FF" alignment="entire"/> </imagestyle>
				<script name="OnIntro"> SetOffset({40,285,240,295},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-180,110,-80,120},0,$params[0],"linear_accel"); </script>
				<script name="OnInit"> SetRealPos(:sonique.players.default.GetPlaybackMethod()["transitiontime"]/10); UpdateDisplay(); </script>
				<script name="OnPosChange">
					UpdateDisplay();
					:sonique.players.default.SetPlaybackMethod(transitionpicker.GetCurrentItem()["Data"], GetRealPos()*10);
				</script>
				<script name="UpdateDisplay">
					$val = GetRealPos()*10;
					delayvalue.SetText( :math.Truncate( $val ) | "." | :math.Truncate( ($val*10)%10 ) | "sec" );
				</script>
			</window>
		</window>		
<!-- END GENERAL PREFS -->




<!-- START ADVANCED PREFS -->
		<window  name="miscPrefs" offset="0,0,485,300" alignment="0,0,0,0" transparent="true" >
			<imagestyle name="background"> <color_rect color="0xFFFFFFFF" alignment="entire" blendmode="COPY|RGB" />	</imagestyle>
			
			<!-- DEFAULT SORT -->
			<window  name="sort_definition" offset="10,10,-10,115" alignment="0,0,1,0" transparent="true" >
				<imagestyle name="background"> <color_rect color="0xFFFFFFFF" alignment="entire" blendmode="COPY|RGB" />	</imagestyle>
				<script name="OnInit">
					// NB: this sort is defined both here and in the playlist window.
					defaultFieldArray = {"artist","album","track","filename"};
					defaultDirectionArray = {"forwards","forwards","forwards","forwards"};

					nocolumn = :language.Translate("settings/playlist.nocolumn");
					filename = :language.Translate("playlistwindow/playlist.filename");
					tracktitle = :language.Translate("playlistwindow/playlist.tracktitle");
					artist = :language.Translate("playlistwindow/playlist.artist");
					album = :language.Translate("playlistwindow/playlist.album");
					tracknumber = :language.Translate("playlistwindow/playlist.tracknumber");
					genre = :language.Translate("playlistwindow/playlist.genre");
					author = :language.Translate("playlistwindow/playlist.author");
					year = :language.Translate("playlistwindow/playlist.year");
					duration = :language.Translate("playlistwindow/playlist.duration");
					extension = :language.Translate("playlistwindow/playlist.extension");
				</script>
				<script name="OnIntro">
					// grab the users preference
					:sonique.prefs.CreateSection("sonique/gui/slate/defaultsort"); 
					$origFieldArray = :sonique.prefs.GetStringArray("sonique/gui/slate/defaultsort","Fields");
					$origDirectionArray = :sonique.prefs.GetStringArray("sonique/gui/slate/defaultsort","Directions");

					// if they don't have one, use the default
					if (!$origFieldArray.IsArray()) { 
						:sonique.prefs.SetStringArray("sonique/gui/slate/defaultsort","Fields", defaultFieldArray);
						:sonique.prefs.SetStringArray("sonique/gui/slate/defaultsort","Directions", defaultDirectionArray);
						$origFieldArray = defaultFieldArray;
						$origDirectionArray = defaultDirectionArray;
					}

					$num = $origFieldArray.ArraySize();
					if ($num > 5) { sixth_sort.SetCurrentIndex({none: 0, filename: 1, title: 2, artist: 3, album: 4, track: 5, genre: 6, author: 7, year: 8, time: 9, extension: 10 }[$origFieldArray[5]]); }
					else	{ sixth_sort.SetCurrentIndex(0); }
					if ($num > 4) { fifth_sort.SetCurrentIndex({none: 0, filename: 1, title: 2, artist: 3, album: 4, track: 5, genre: 6, author: 7, year: 8, time: 9, extension: 10 }[$origFieldArray[4]]); }
					else	{ fifth_sort.SetCurrentIndex(0); }
					if ($num > 3) { fourth_sort.SetCurrentIndex({none: 0, filename: 1, title: 2, artist: 3, album: 4, track: 5, genre: 6, author: 7, year: 8, time: 9, extension: 10 }[$origFieldArray[3]]); }
					else	{ fourth_sort.SetCurrentIndex(0); }
					if ($num > 2) { third_sort.SetCurrentIndex({none: 0, filename: 1, title: 2, artist: 3, album: 4, track: 5, genre: 6, author: 7, year: 8, time: 9, extension: 10 }[$origFieldArray[2]]); }
					else	{ third_sort.SetCurrentIndex(0); }
					if ($num > 1) { second_sort.SetCurrentIndex({none: 0, filename: 1, title: 2, artist: 3, album: 4, track: 5, genre: 6, author: 7, year: 8, time: 9, extension: 10 }[$origFieldArray[1]]); }
					else	{ second_sort.SetCurrentIndex(0); }
					if ($num > 0) { first_sort.SetCurrentIndex({none: 0, filename: 1, title: 2, artist: 3, album: 4, track: 5, genre: 6, author: 7, year: 8, time: 9, extension: 10 }[$origFieldArray[0]]); }
					else	{ first_sort.SetCurrentIndex(0); }


					if ($origDirectionArray.IsArray())
					{					
						$num = $origFieldArray.ArraySize();
						if ($num > 5) { sixth_direction.SetCurrentIndex({forwards: 0, reverse: 1 }[$origDirectionArray[5]]); }
						else	{ sixth_direction.SetCurrentIndex(0); }
						if ($num > 4) { fifth_direction.SetCurrentIndex({forwards: 0, reverse: 1 }[$origDirectionArray[4]]); }
						else	{ fifth_direction.SetCurrentIndex(0); }
						if ($num > 3) { fourth_direction.SetCurrentIndex({forwards: 0, reverse: 1 }[$origDirectionArray[3]]); }
						else	{ fourth_direction.SetCurrentIndex(0); }
						if ($num > 2) { third_direction.SetCurrentIndex({forwards: 0, reverse: 1 }[$origDirectionArray[2]]); }
						else	{ third_direction.SetCurrentIndex(0); }
						if ($num > 1) { second_direction.SetCurrentIndex({forwards: 0, reverse: 1 }[$origDirectionArray[1]]); }
						else	{ second_direction.SetCurrentIndex(0); }
						if ($num > 0) { first_direction.SetCurrentIndex({forwards: 0, reverse: 1 }[$origDirectionArray[0]]); }
						else	{ first_direction.SetCurrentIndex(0); }
					}
				</script>
				<script name="Apply">
					// if the first field is 'none' i just bail.  put that in your pipe and smoke it.
					if (first_sort.GetCurrentItem()["Data"] != "none") 
					{
						// jmctodo hack to work around a bug.  
						// if i skip the temp step, the data field loses its data identifier.  grrr.
						//$newFieldArray = {first_sort.GetCurrentItem()["Data"]};
						//$newDirectionArray = {first_direction.GetCurrentItem()["Data"]};
						$tempField = first_sort.GetCurrentItem()["Data"];
						$tempDirection = first_direction.GetCurrentItem()["Data"];
						$newFieldArray = {$tempField};
						$newDirectionArray = {$tempDirection};
						
						if (second_sort.GetCurrentItem()["Data"] != "none") {
							$tempField = second_sort.GetCurrentItem()["Data"];
							$tempDirection = second_direction.GetCurrentItem()["Data"];
							$newFieldArray = $newFieldArray | {$tempField};
							$newDirectionArray = $newDirectionArray | {$tempDirection};
						}
						if (third_sort.GetCurrentItem()["Data"] != "none") {
							$tempField = third_sort.GetCurrentItem()["Data"];
							$tempDirection = third_direction.GetCurrentItem()["Data"];
							$newFieldArray = $newFieldArray | {$tempField};
							$newDirectionArray = $newDirectionArray | {$tempDirection};
						}
						if (fourth_sort.GetCurrentItem()["Data"] != "none") {
							$tempField = fourth_sort.GetCurrentItem()["Data"];
							$tempDirection = fourth_direction.GetCurrentItem()["Data"];
							$newFieldArray = $newFieldArray | {$tempField};
							$newDirectionArray = $newDirectionArray | {$tempDirection};
						}
						if (fifth_sort.GetCurrentItem()["Data"] != "none") {
							$tempField = fifth_sort.GetCurrentItem()["Data"];
							$tempDirection = fifth_direction.GetCurrentItem()["Data"];
							$newFieldArray = $newFieldArray | {$tempField};
							$newDirectionArray = $newDirectionArray | {$tempDirection};
						}
						if (sixth_sort.GetCurrentItem()["Data"] != "none") {
							$tempField = sixth_sort.GetCurrentItem()["Data"];
							$tempDirection = sixth_direction.GetCurrentItem()["Data"];
							$newFieldArray = $newFieldArray | {$tempField};
							$newDirectionArray = $newDirectionArray | {$tempDirection};
						}
						:sonique.prefs.SetStringArray("sonique/gui/slate/defaultsort","Fields", $newFieldArray);
						:sonique.prefs.SetStringArray("sonique/gui/slate/defaultsort","Directions", $newDirectionArray);
					}
					else
					{
						Restore();
					}
				</script>
				<script name="Restore">
					:sonique.prefs.SetStringArray("sonique/gui/slate/defaultsort","Fields", defaultFieldArray);
					:sonique.prefs.SetStringArray("sonique/gui/slate/defaultsort","Directions", defaultDirectionArray);
					OnIntro();
				</script>

				<window name="defaultsort_title" transparent="true" type="textdisplay" offset="10,10,360,30" alignment="0,0,0,0"  >
					<property font_color="0xFFFFFFFF" font_justification="left|v_center" />
					<script name="OnInit"> SetText( :language.Translate("settings/playlist.defaultsort") ); </script>
				</window>
				<window name="restore" type="button" offset="280,10,360,30" alignment="0,0,0,0"  hitstyle="ACTIVE">
					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
					<script name="OnInit"> SetText(:language.Translate("settings/generic.restore")); </script>
					<script name="OnClick"> sort_definition.Restore(); </script>
					<property hoverhint="restore default sort" default_delay="150" text="Apply" font_color = "0xFFFFFFFF"/>
				</window>
				<window name="apply" type="button" offset="370,10,450,30" alignment="0,0,0,0"  hitstyle="ACTIVE">
					<imagestyle name="state0">
						<color_fill color = "0xFF6060C0" state="normal"/>
						<color_fill color = "0xFF7070D0" state="hover" />
						<color_fill color = "0xFF8080FF" state="hit"   />
					</imagestyle>
					<script name="OnInit"> SetText(:language.Translate("settings/generic.apply")); </script>
					<script name="OnClick"> sort_definition.Apply(); </script>
					<property hoverhint="apply sorting changes" default_delay="150" text="Apply" font_color = "0xFFFFFFFF"/>
				</window>
				<?macroins default_sort_entry name="first" label="1" number_offset="10,40,20,55" field_offset="20,40,90,55" direction_offset="100,40,190,55"?>
				<?macroins default_sort_entry name="second" label="2" number_offset="10,60,20,75" field_offset="20,60,90,75" direction_offset="100,60,190,75"?>
				<?macroins default_sort_entry name="third" label="3" number_offset="10,80,20,95" field_offset="20,80,90,95" direction_offset="100,80,190,95"?>
				<?macroins default_sort_entry name="fourth" label="4" number_offset="225,40,235,55" field_offset="235,40,305,55" direction_offset="315,40,405,55"?>
				<?macroins default_sort_entry name="fifth" label="5" number_offset="225,60,235,75" field_offset="235,60,305,75" direction_offset="315,60,405,75"?>
				<?macroins default_sort_entry name="sixth" label="6" number_offset="225,80,235,95" field_offset="235,80,305,95" direction_offset="315,80,405,95"?>
			</window>
			<!-- HOTKEYS -->
			<window name="hotkeysCheckbox" type="button" offset="-180,19,0,33" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE" >
				<property hover="true"/>
				<imagestyle name="state0"> <include source="MML_Mood_DlgCheckBoxState0" />	</imagestyle>
				<imagestyle name="state1"> <include source="MML_Mood_DlgCheckBoxState1" />	</imagestyle>
				<script name="OnIntro"> SetOffset({10,119,24,133},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({-180,19,0,33},0,$params[0],"linear_accel"); </script>
				<script name="OnInit">
					SetToggle(true);
					hotkeysection = "sonique/gui/slate/hotkeys";
					:sonique.prefs.CreateSection(hotkeysection);

					if( :sonique.prefs.GetString(hotkeysection, "enabled") ) { SetButtonState(1); } else { SetButtonState(0);	}
				</script>
				<script name="OnClick">
					if( GetButtonState() == 0 ) { :sonique.prefs.SetString(hotkeysection, "enabled", "false");	} else { :sonique.prefs.SetString(hotkeysection, "enabled", "true"); }
					:app.EnableKeyScripts( GetButtonState() );
				</script>
			</window>
			<window name="hotkeysCheckbox_title" type="textdisplay" offset="-180,32,0,46" alignment="0,0,0,0" transparent="true" >
				<property font_color="0xFFFFFFFF" />
				<script name="OnIntro"> SetOffset({30,120,150,134},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({-180,20,0,34},0,$params[0],"linear_accel");	</script>
				<script name="OnInit"> SetText(:language.Translate("settings/hotkeys.enable")); </script>
			</window>
			<window name="hotkeysHelp" type="button" offset="-180,120,0,134" alignment="0,0,0,0" hitstyle="ACTIVE">
				<imagestyle name="state0">
					<color_fill color = "0xFF6060C0" state="normal"/>
					<color_fill color = "0xFF7070D0" state="hover" />
					<color_fill color = "0xFF8080FF" state="hit"   />
				</imagestyle>
				<script name="OnIntro"> SetOffset({170,120,300,134},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({-180,50,0,64},0,$params[0],"linear_accel");	</script>
				<script name="OnInit"> SetText(:language.Translate("settings/hotkeys.help")); </script>
				<script name="OnClick"> :sonique.LaunchHelp("hotkeys"); </script>
				<property default_delay="150" text="" font_color = "0xFFFFFFFF"/>
			</window>
			<!-- jmctodo use :language.Translate("settings/hotkeys.title")); and list all assigned hotkeys -->
			<!-- RADIAL KNOBS -->
			<window name="RadialKnobCheckbox" type="button" offset="10,33,-10,-18" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE">
				<property hover="true"/>
				<imagestyle name="state0"> <include source="MML_Mood_DlgCheckBoxState0" /> </imagestyle>
				<imagestyle name="state1"> <include source="MML_Mood_DlgCheckBoxState1" /> </imagestyle>
				<script name="OnIntro"> SetOffset({10,139,24,153},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({10,-33,-10,18},0,$params[0],"linear_accel"); </script>
				<script name="OnInit">
					SetToggle(true);
					if( :sonique.prefs.GetString("misc", "radialknobs") ) {
						SetButtonState( 1 );
					} else {
						SetButtonState( 0 );
					}
				</script>
				<script name="OnClick">
					:sonique.SetKnobRadialControl( GetButtonState() );
					:sonique.prefs.CreateSection("misc");
					:sonique.prefs.SetString("misc", "radialknobs", GetButtonState() );
					if( GetButtonState() ) {
						:sonique.Status(:language.Translate("settings/knobs.radialstatus"));
					} else {
						:sonique.Status(:language.Translate("settings/knobs.linearstatus"));
					}
				</script>
			</window>
			<window name="Radial_title" type="textdisplay" offset="-180,16,0,32" alignment="0,0,1,0"  transparent="true" >
				<property font_color="0xFFFFFFFF" />
				<script name="OnIntro"> SetOffset({30,140,-10,151},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-33,-10,18},0,$params[0],"linear_accel");	</script>		
				<script name="OnInit"> SetText(:language.Translate("settings/knobs.radial")); </script>
			</window>

			<!-- Minimize To Tray-->
			<window name="MinToTrayCheckbox" type="button" offset="110,33,-10,-18" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE">
				<property hover="true"/>
				<imagestyle name="state0"> <include source="MML_Mood_DlgCheckBoxState0" /> </imagestyle>
				<imagestyle name="state1"> <include source="MML_Mood_DlgCheckBoxState1" /> </imagestyle>
				<script name="OnIntro"> SetOffset({110,139,124,153},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({10,-33,-10,18},0,$params[0],"linear_accel"); </script>
				<script name="OnInit">
					SetToggle(true);
					if( :sonique.prefs.GetString("misc", "minimizetotray") ) {
						//RemoveFromTbarCheckbox.SetButtonState( 0 );
						//RemoveFromTbarCheckbox.Disable();
						SetButtonState( 1 );
						//:sonique.SetMinimizeToTray( 1 );
					} else {
						//RemoveFromTbarCheckbox.Enable();
						SetButtonState( 0 );
						//:sonique.SetMinimizeToTray( 0 );
					}
				</script>
				<script name="OnClick">
					:sonique.SetMinimizeToTray( GetButtonState() );
					:sonique.prefs.CreateSection("misc");
					:sonique.prefs.SetString("misc", "minimizetotray", GetButtonState() );
					if( GetButtonState() ) {
						//RemoveFromTbarCheckbox.SetButtonState( 0 );
						//RemoveFromTbarCheckbox.Disable();
						:sonique.Status("Minimize to Tray");
					} else {
						//RemoveFromTbarCheckbox.Enable();
						:sonique.Status("Plain old Minimize");
					}
				</script>
			</window>
			<window name="MinToTray_title" type="textdisplay" offset="-180,16,0,32" alignment="0,0,1,0"  transparent="true" >
				<property font_color="0xFFFFFFFF" />
				<script name="OnIntro"> SetOffset({130,139,-10,151},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-33,-10,18},0,$params[0],"linear_accel");	</script>		
				<script name="OnInit"> SetText("Minimize To Tray"); </script>
			</window>

			<!-- Minimize All To Tray-->
			<window name="MinAllToTrayCheckbox" type="button" offset="230,33,-10,-18" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE">
				<property hover="true"/>
				<imagestyle name="state0"> <include source="MML_Mood_DlgCheckBoxState0" /> </imagestyle>
				<imagestyle name="state1"> <include source="MML_Mood_DlgCheckBoxState1" /> </imagestyle>
				<script name="OnIntro"> SetOffset({230,139,244,153},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({10,-33,-10,18},0,$params[0],"linear_accel"); </script>
				<script name="OnInit">
					SetToggle(true);
					if( :sonique.prefs.GetString("misc", "minimizealltotray") ) {
						//RemoveFromTbarCheckbox.SetButtonState( 0 );
						//RemoveFromTbarCheckbox.Disable();
						SetButtonState( 1 );
						//:sonique.SetMinimizeAllToTray( 1 );
					} else {
						//RemoveFromTbarCheckbox.Enable();
						SetButtonState( 0 );
						//:sonique.SetMinimizeAllToTray( 0 );
					}
				</script>
				<script name="OnClick">
					:sonique.SetMinimizeAllToTray( GetButtonState() );
					:sonique.prefs.CreateSection("misc");
					:sonique.prefs.SetString("misc", "minimizealltotray", GetButtonState() );
					if( GetButtonState() ) {
						//RemoveFromTbarCheckbox.SetButtonState( 0 );
						//RemoveFromTbarCheckbox.Disable();
						:sonique.Status("Minimize All to Tray");
					} else {
						//RemoveFromTbarCheckbox.Enable();
						:sonique.Status("Minimize individually to tray");
					}
				</script>
			</window>
			<window name="MinAllToTray_title" type="textdisplay" offset="-180,16,0,32" alignment="0,0,1,0"  transparent="true" >
				<property font_color="0xFFFFFFFF" />
				<script name="OnIntro"> SetOffset({250,139,-10,300},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-33,-10,18},0,$params[0],"linear_accel");	</script>		
				<script name="OnInit"> SetText("Minimize All To Tray"); </script>
			</window>

			<window name="SensitivityText" type="textdisplay" offset="10,-53,110,-38" transparent="true" >
				<script name="OnInit"> SetText(:language.Translate("settings/knobs.knobsensitivity")); </script>
				<property	font_color ="SQ2_Mood_text_color_001" />
				<script name="OnIntro"> SetOffset({10,158,110,173},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-53,110,38},0,$params[0],"linear_accel");	</script>
			</window>
			<window name="sldrKnobSensitivity" type="fillbar" offset="110,-53,10,-38" alignment="0,0,1,0" transparent="false"  hitstyle="ACTIVE" >
				<property orientation="left_to_right"/> 
				<imagestyle name="barempty"> <color_fill color="0xFF8080FF" alignment="entire"/></imagestyle>
				<imagestyle name="barfilled"> <color_fill color="0xFF0000FF" alignment="entire"/> </imagestyle>
				<script name="OnIntro"> SetOffset({110,158,-10,173},0,$params[0],"linear_accel"); </script>
				<script name="OnExtro"> SetOffset({110,-53,-10,38},0,$params[0],"linear_accel"); </script>
				<script name="OnInit"> SetMin(50); SetMax(500); $val = SetIntPos(:sonique.prefs.GetString("misc", "knobsensitivity")); </script>
				<script name="OnPosChange">
					$val = GetIntPos();
					:sonique.prefs.SetString("misc", "knobsensitivity", $val);
					:sonique.SetKnobSensitivity( $val );
					:sonique.StatusProportion(:language.Translate("settings/knobs.sensitivityset") | $val, ($val-50)/450);
				</script>
			</window>

			<window name="DitherCheckbox" type="button" offset="10,-73,10,-58" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE">
				<property hover="true"/>
				<imagestyle name="state0"> <include source="MML_Mood_DlgCheckBoxState0" /> </imagestyle>
				<imagestyle name="state1"> <include source="MML_Mood_DlgCheckBoxState1" /> </imagestyle>
				<script name="OnIntro"> SetOffset({10,188,24,202},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-73,-10,58},0,$params[0],"linear_accel");	</script>
				<script name="OnInit">
					SetToggle(true);
					if( :sonique.prefs.GetString("misc", "dithering") )
						{ SetButtonState( 1 ); } 
					else 
						{ SetButtonState( 0 ); }
				</script>
				<script name="OnClick">
					:sonique.EnableDithering( GetButtonState() );
					:sonique.prefs.CreateSection("misc");
					:sonique.prefs.SetString("misc", "dithering", GetButtonState() );
					if( GetButtonState() )
						{ :sonique.Status(:language.Translate("settings/imagedithering.enabledstatus")); }
					else
						{ :sonique.Status(:language.Translate("settings/imagedithering.disabledstatus")); }
				</script>
			</window>
			<window name="Dither_title" type="textdisplay" offset="10,-73,-10,-58" alignment="0,0,1,0" transparent="true" >
				<script name="OnIntro"> SetOffset({30,188,-10,202},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-73,-10,58},0,$params[0],"linear_accel");	</script>
				<script name="OnInit"> SetText(:language.Translate("settings/imagedithering.text")); </script>
				<property font_color="0xFFFFFFFF" />
			</window>


			<!-- remove from taskbar -->
			<window name="RemoveFromTbarCheckbox" type="button" offset="10,-73,10,-58" alignment="0,0,0,0" transparent="true" hitstyle="ACTIVE">
				<property hover="true"/>
				<imagestyle name="state0"> <include source="MML_Mood_DlgCheckBoxState0" /> </imagestyle>
				<imagestyle name="state1"> <include source="MML_Mood_DlgCheckBoxState1" /> </imagestyle>
				<script name="OnIntro"> SetOffset({140,188,155,202},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-73,-10,58},0,$params[0],"linear_accel");	</script>
				<script name="OnInit">
					//:sonique.prefs.PrepString("misc", "removefromtaskbar", "false");
					SetToggle(true);
					if( :sonique.prefs.GetString("misc", "removefromtaskbar") ) {
						//MinToTrayCheckbox.SetButtonState( 0 );
						//MinAllToTrayCheckbox.SetButtonState( 0 );
						MinToTrayCheckbox.Disable();
						MinAllToTrayCheckbox.Disable();
						SetButtonState( 1 );
						//:sonique.SetRemoveFromTaskbar( 1 );
					} else {
						MinToTrayCheckbox.Enable();
						MinAllToTrayCheckbox.Enable();
						SetButtonState( 0 );
						//:sonique.SetRemoveFromTaskbar( 0 );
					}
				</script>
				<script name="OnClick">
					:sonique.SetRemoveFromTaskbar( GetButtonState() );
					:sonique.prefs.SetString("misc", "removefromtaskbar", GetButtonState() );
					if( GetButtonState() ) {
						//MinToTrayCheckbox.SetButtonState( 0 );
						//MinAllToTrayCheckbox.SetButtonState( 0 );
						MinToTrayCheckbox.Disable();
						MinAllToTrayCheckbox.Disable();
						:sonique.Status("Remove windows from taskbar");
					} else {
						MinToTrayCheckbox.Enable();
						MinAllToTrayCheckbox.Enable();
						:sonique.Status("Display windows in the taskbar");
					}
				</script>
			</window>
			<window name="RemoveFromTbar_title" type="textdisplay" offset="10,-73,-10,-58" alignment="0,0,1,0"  transparent="true" >
				<property font_color="0xFFFFFFFF" />
				<script name="OnIntro"> SetOffset({160,188,190,202},0,$params[0],"linear_accel");	</script>
				<script name="OnExtro"> SetOffset({10,-73,-10,58},0,$params[0],"linear_accel");	</script>
				<script name="OnInit"> SetText("Remove from Taskbar"); </script>
			</window> 




			<!-- DISPLAY STRING -->
			<window  name="displaystringtitle" offset="10,210,-10,224" alignment="0,0,1,0" type="textdisplay" transparent="true">
				<script name="OnInit"> SetText(:language.Translate("settings/playlist.displaystring")); </script>
				<property font_color="0xFF9FFFFF" />
			</window>
			<window offset="20,226,-10,246" alignment="0,0,1,0" type="EditBox" name="testedit">
				<script name="OnIntro"> SetText( :sonique.player.DefaultTitleFormat ); </script>
				<script name="OnExtro">	Save(); </script>
				<script name="OnDestroy"> Save(); </script>
				<script name="Save"> :sonique.player.DefaultTitleFormat = GetText(); </script>
				<imagestyle name="background_inactive"> <color_fill alignment="entire" color="0xFF000080" /> </imagestyle>
				<imagestyle name="background_active"> <color_fill alignment="entire" color="0xFF0000FF" /> </imagestyle>
				<property font_color="0xFFFFFFFF" cursor_on_color="0xFFFFFFFF" cursor_off_color="0x00FFFFFF"/>
			</window>
			<!-- CD Play --->
			<window  name="cdplaystring" offset="10,250,-10,266" alignment="0,0,1,0" type="textdisplay" transparent="true">
				<script name="OnInit"> SetText("Cd Play Options"); </script>
				<property font_color="0xFF9FFFFF" />
			</window>
			<window offset="20,270,30,280" alignment="0,0,0,0" type="button" name="cdanalog" hitstyle="ACTIVE" transparent="true">
				<property hover="true"/>
				<imagestyle name="state0"><include source="MML_Mood_DlgCheckBoxState0" /></imagestyle>
				<imagestyle name="state1"><include source="MML_Mood_DlgCheckBoxState1" /></imagestyle>
				<script name="OnInit">
					SetToggle(true);
					if( :sonique.prefs.GetString("sonique/player", "cdplayformat") == "1")
						{ SetButtonState( 1 ); } 
					else 
						{ SetButtonState( 0 ); }
				</script>
				<script name="OnClick">
					if( GetButtonState() ) { 
						:sonique.Status("Analog");
						:sonique.prefs.SetString("sonique/player", "cdplayformat", "1");
						cddigital.SetButtonState(0); 
						SetButtonState( 1); 
					} else { 
						:sonique.Status("Digital"); 
						:sonique.prefs.SetString("sonique/player", "cdplayformat", "2");
						cddigital.SetButtonState(0); 
						SetButtonState( 0 ); 
					}
				</script>
			</window>
			<window offset="40,270,90,285" alignment="0,0,0,0" type="textdisplay" name="cdanalog_text" transparent="true">
				<script name="OnInit"> SetText("Analog"); </script>
				<property font_color="0xFF9FFFFF" />
			</window>
			<window offset="95,270,105,280" alignment="0,0,0,0" type="button" name="cddigital" hitstyle="ACTIVE" transparent="true">
				<property hover="true"/>
				<imagestyle name="state0">
					<include source="MML_Mood_DlgCheckBoxState0" />
				</imagestyle>
				<imagestyle name="state1">
					<include source="MML_Mood_DlgCheckBoxState1" />
				</imagestyle>

				<script name="OnInit">
					SetToggle(true);
					if( :sonique.prefs.GetString("sonique/player", "cdplayformat") == "2")
						{ SetButtonState( 1 ); } 
					else 
						{ SetButtonState( 0 ); }
				</script>
				<script name="OnClick">
					if( GetButtonState() ) { 
						:sonique.Status("Digital");
						:sonique.prefs.SetString("sonique/player", "cdplayformat", "2");
						SetButtonState( 1); 
						cdanalog.SetButtonState(0); 
					} else { 
						:sonique.Status("Analog"); 
						:sonique.prefs.SetString("sonique/player", "cdplayformat", "1");
						cdanalog.SetButtonState(1); 
						SetButtonState( 0 ); 
					}
				</script>

			</window>
			<window offset="110,270,155,285" alignment="0,0,0,0" type="textdisplay" name="cddigital_text" transparent="true">
				<script name="OnInit"> SetText("Digital"); </script>
				<property font_color="0xFF9FFFFF" />
			</window>
		</window>	
<!-- END ADVANCED PREFS -->

<!-- START ONLINE -->
		<window  name="SQ2_NoOnlineWindow" offset="0,0,188,144" alignment="0,0,0,0" transparent="true" >
			<imagestyle name="background"> 
				<color_fill color="0xFF303030" alignment="0,0,1,1" blendmode="COPY|RGB" />	
				<raster source="sq2res.psd|s_logo_large" blendmode="ps_normal" alignment=".5,.5,.5,.5" offset="-40,-60,40,20" />
			</imagestyle>
			<window name="text" transparent="true" type="textdisplay" >
				<property edge_offset_rect="10,100,-10,-10" font_style="my_font_8_bold" font_color="0xFFFFFFFF"  font_justification="h_center|v_center" />
				<script name="OnInit"> SetText(:language.Translate("onlinewindow/no.online")); </script>
			</window>
		</window>
<!-- END ONLINE -->

	</interface>
</mml>
