require( "scripts/style.lua" );

ButtonFont = {
  standardFont,
  28,
  BlackColor
};

SliderFont = {
  standardFont,
  30,
  PopupTextColor
};

OptionsTitleFont = {
  standardFont,
  34,
  BlackColor
};


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=20,w=200,h=50,
--				flags = kHAlignCenter + kVAlignCenter,
--				label = "options1"
--			};
			
			Text
			{
				name = "ambient",
				font = SliderFont,
				x=kCenter-140,y=120,w=200,h=50,
				flags = kHAlignCenter + kVAlignCenter,
				label = "ambientlevel"
			};


			Text
			{
				name = "sfx",
				font = SliderFont,
				x=kCenter - 140,y=180,w=200,h=50,
				flags = kHAlignCenter + kVAlignCenter,
				label = "sfxlevel"
			};
		
			Text
			{
				font = SliderFont,
				name = "music",
				x=kCenter - 140,y=240,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=315,
				w=50,
				command=
				function()
					if (ToggleFullScreen() == false) then
						AddBoardWidget();		
						SetNameInfosToRun("infoToggleFS");
						DoModal("scripts/infos.lua");
					end
					AdjustFSButton();
				end

			};

			Button{
				name="CustomCursor",
				parent = DefaultStyle,
				type = kToggle,
				sound = kDefaultButtonSound,
				graphics = {"buttons/check",	"buttons/check_on",	"buttons/check_mouseover",	"buttons/check_on_mouseover" },
				x=kCenter + 95,
				y=375,
				w=50,
				command=
				function()
					ToggleCustomCursor()
				end
			};

				Text
				{
					font = SliderFont,
					name = "fullscreenlabel",
					x=kCenter - 20,
					y=320,
					w=200,
					h=50,
					flags = kHAlignLeft + kVAlignTop,
					label="fullscreen",
				};

				Text
				{
					font = SliderFont,
					name = "CustomCursorLabel",
					x=kCenter - 20,
					y=380,
					w=200,
					h=50,
					flags = kHAlignLeft + kVAlignTop,
					label="CustomCursor",
				};
			
			butok ="b_ok;264, 420, 127, 47;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/sliderrailtop",	railmid = "slider/sliderrailmid",	railbot = "slider/sliderrailbot",	
				sliderimage = "slider/sliderknob", sliderrollimage = "slider/sliderknobover",
				yoffset = 5, -- scoot the slider down by one pixel to center it.
				x = kCenter+84, y = 130, w = 220,
			},

			Slider
			{
				name="sfxlevelslider",
				parent=DefaultStyle,
				railtop = "slider/sliderrailtop",	railmid = "slider/sliderrailmid",	railbot = "slider/sliderrailbot",	
				sliderimage = "slider/sliderknob", sliderrollimage = "slider/sliderknobover",
				yoffset = 5, -- scoot the slider down by one pixel to center it.
				x = kCenter+84, y = 190, w = 220,
			},
			
			Slider
			{
				name="musiclevelslider",
				parent=DefaultStyle,
				railtop = "slider/sliderrailtop",	railmid = "slider/sliderrailmid",	railbot = "slider/sliderrailbot",	
				sliderimage = "slider/sliderknob", sliderrollimage = "slider/sliderknobover",
				yoffset = 5, -- scoot the slider down by one pixel to center it.
				x = kCenter+84, y = 250, w = 220,
			};
		},
	},
}