require( "scripts/style.lua" );

ButtonFont = {
  standardFont,
  28,
  WhiteColor
};

SliderFont = {
  standardFont,
  24,
  WhiteColor
};

OptionsTitleFont = {
  standardFont,
  34,
  WhiteColor
};


MakeDialog
{
	-- Name the modal dialog
	name="OptionsWindow",
	Bitmap
	{
		image="backgrounds/options",
		x = kCenter,
		y = kCenter,
		
		OptionsWindow
		{
			x=0,y=0,w=kMax,h=kMax,
			name="Options",

--			Text
--			{
--				name = "options",
--				font = OptionsTitleFont,
--				x=kCenter,y=200,w=200,h=50,
--				flags = kHAlignCenter + kVAlignCenter,
--				label = "options1"
--			};
--			
--			Text
--			{
--				name = "ambient",
--				font = SliderFont,
--				x=kCenter-150,y=285,w=200,h=50,
--				flags = kHAlignCenter + kVAlignCenter,
--				label = "ambientlevel"
--			};
--
--			Text
--			{
--				name = "sfx",
--				font = SliderFont,
--				x=kCenter - 150,y=335,w=200,h=50,
--				flags = kHAlignCenter + kVAlignCenter,
--				label = "sfxlevel"
--			};
--		
--			Text
--			{
--				font = SliderFont,
--				name = "music",
--				x=kCenter - 150,y=385,w=200,h=50,
--				flags = kHAlignCenter + kVAlignCenter,
--				label = "musiclevel"
--			};
--
			Button{
				name="fullscreen",
				parent = DefaultStyle,
				type = kToggle,
				sound = kDefaultButtonSound,
				graphics = {"buttons/check",	"buttons/check_on",	"buttons/check_mouseover",	"buttons/check_on_mouseover" },
				x=kCenter + 95,
				y=260,
				w=50,
--				Text
--				{
--					font = SliderFont,
--					name = "fullscreenlabel",
--					x=54,
--					y=5,
--					w=kMax,
--					h=kMax,
--					flags = kHAlignLeft + kVAlignTop,
--					label="fullscreen",
--				};
				command=
				function()
					if (ToggleFullScreen() == false) then
						AddBoardWidget();		
						SetNameInfosToRun("infoToggleFS");
						DoModal("scripts/infos.lua");
					end
					AdjustFSButton();
				end
				
			};
			
			butok ="b_ok;160, 327, 108, 41;fonts/arial.mvec;215,215,215,255;255,255,255,255;23;buttons/b_ok;buttons/b_ok_pressed;buttons/b_ok_mouseover",	
			shadow ="backgrounds/sh1;0,0,1024,768;0.3;0.8",
			sliderBoderwidth="32",
			--correct for MUSIC_DEFAULT_SOUND_VOLUME=650(settins)
			AddCoefIncreaseVol="0.47",
			TestSound="audio/sfx/scrollmove.ogg",
			PlayTestSoundLength="0.1",
			Slider
			{
				name="ambientlevelslider",
				parent=DefaultStyle,
				railtop = "slider/sliderPart",	railmid = "slider/sliderPart",	railbot = "slider/sliderPart",	
				sliderimage = "slider/sliderknob", sliderrollimage = "slider/sliderknobover",
				yoffset = 5, -- scoot the slider down by one pixel to center it.
				x = kCenter+54, y = 123, w = 170,
			},

			Slider
			{
				name="sfxlevelslider",
				parent=DefaultStyle,
				railtop = "slider/sliderPart",	railmid = "slider/sliderPart",	railbot = "slider/sliderPart",	
				sliderimage = "slider/sliderknob", sliderrollimage = "slider/sliderknobover",
				yoffset = 5, -- scoot the slider down by one pixel to center it.
				x = kCenter+54, y = 164, w = 170,
			},
			
			Slider
			{
				name="musiclevelslider",
				parent=DefaultStyle,
				railtop = "slider/sliderPart",	railmid = "slider/sliderPart",	railbot = "slider/sliderPart",	
				sliderimage = "slider/sliderknob", sliderrollimage = "slider/sliderknobover",
				yoffset = 5, -- scoot the slider down by one pixel to center it.
				x = kCenter+54, y = 205, w = 170,
			};
		},
	},
}