require "scripts/style"

SliderFont = {
  standardFont,
  16,
  BlackColor
};


MakeDialog
{
	-- Name the modal dialog
	name="optionsmenu",
	Bitmap
	{
		image="backgrounds/dialog",
		x = kCenter,
		y = kCenter,

		OptionsWindow
		{
			x=0,y=0,w=kMax,h=kMax,

			Text
			{
				font = StandardButtonFont,--SliderFont,
				name = "sfx",
				x=70,y=30,w=50,h=50,
				flags = kHAlignCenter + kVAlignCenter,
				label = "sfxlevel"
			};

			Text
			{
				font = StandardButtonFont,--SliderFont,
				name = "music",
				x=70,y=75,w=50,h=50,
				flags = kHAlignCenter + kVAlignCenter,
				label = "musiclevel"
			};
--[[
			Text
			{
				font = SliderFont,
				name = "voiceover",
				x=40,y=120,w=50,h=50,
				flags = kHAlignCenter + kVAlignCenter,
				label = "voiceoverlevel"
			};
--]]
			SetStyle(CheckboxButtonStyle),
			Button{
				name="fullscreen",
				label="fullscreen",
				x=55,
				y=120,
				w=110,
				command=
				function()
					if (ToggleFullScreen() == false) then
						DisplayDialog {
							"scripts/ok.lua",
							body ="screenswitchfailed",
							title = "aproblemhappened"
						};
					end
				end

			};

			Button{
				name="mutebox",
				x=55,
				y=155,--200,
				w=140,
				label = "mutesound",
				command =
					function()
						ToggleSoundMute();
					end
			};

			Button{
				name="letterbox",
				label="letterbox",
				x=205,
				y=120,--160,
				w=100,
				command=
				function()
					ToggleLetterbox();
				end

			};

			Button{
				name="hwmousecursor",
				label="hwmousecursor",
				x=205,
				y=155,--160,
				w=130,
				command=
				function()
					ToggleMouseCursor();
				end

			};            
			Button{
				name="tutorialEnable",
				x=kCenter,
				y=195,--200,
				w=200,
				label = "enableTutorials",
				command =
					function()
						ToggleTutorials();
					end
			};
--			SetStyle(ButtonStyle),
            SetStyle(SmallEmptyRoundButtonStyle),
			Button
			{
				x = kCenter,
				y = kMax-75,
				name="back",
				label="back",
				cancel=true,
				default=true,
				type = kPush,
				command =
					function()
						SaveVolumes();
						PopModal("optionsmenu");
					end
			},
--[[
			Button
			{
				x = kCenter+80,
				y = kMax-50,
				name="credits",
				label="creditsbutton",
				type = kPush,
				command =
					function()
						DoModal("scripts/credits.lua");
					end
			},
--]]
			SetStyle(SliderStyle),
			Slider
			{
				name="sfxlevelslider",
				x = 130,
				y = 40,
				w = 230,
			};

			Slider
			{
				name="musiclevelslider",
				x = 130,
				y = 85,
				w = 230,
			};
--[[
			Slider
			{
				name="voiceoverlevelslider",
				x = 130,
				y = 130,
				w = 230,
			};
            --]]
		},
	},
}

--SetWindowVisible("voiceoverlevelslider", IsVoiceOverActive());
--SetWindowVisible("voiceoverlevel", IsVoiceOverActive());
