
require("menu/menuoptions.lua");
require("scripts/game_style.lua");

menuoptions_group =
{
	OptionsMenu
	{
		name = "optionsmenu",
		x = 0,
		y = 0,
		w = kMax,
		h = kMax,
		
		-- Background
		Bitmap
		{
			name = menuoptions_win_medframemo_params["name"],
			image = menuoptions_win_medframemo_params["image"],
			x = menuoptions_win_medframemo_params["x"],
			y = menuoptions_win_medframemo_params["y"],
		},
		
		-- Title box
		Bitmap
		{
			name = menuoptions_ico_options_params["name"],
			image = menuoptions_ico_options_params["image"],
			x = menuoptions_ico_options_params["x"],
			y = menuoptions_ico_options_params["y"],
		},
		
		-- Title text
		Bitmap
		{
			name = menuoptions_ico_options_params["name"],
			image = menuoptions_ico_options_params["image"],
			x = menuoptions_ico_options_params["x"],
			y = menuoptions_ico_options_params["y"],
		},
		
		-- Ok button
		MonopolyButton
		{
			name = menuoptions_btn_menu_optok_params["name"],
			graphics = menuoptions_btn_menu_optok_params["graphics"];
			x = menuoptions_btn_menu_optok_params["x"],
			y = menuoptions_btn_menu_optok_params["y"],
			label = "common.ok.label",
			font = White15Font,
			
			command = 
				function()
					OnSave();
				end;
		},
		
		-- Cancel button
		MonopolyButton
		{
			name = menuoptions_btn_menu_optcancel_params["name"],
			graphics = menuoptions_btn_menu_optcancel_params["graphics"];
			x = menuoptions_btn_menu_optcancel_params["x"],
			y = menuoptions_btn_menu_optcancel_params["y"],
			label = "common.cancel.label",
			font = White15Font,
			
			command =
				function()
					OnOptionsCancel();
				end;
		},
		
		-- Fullscreen text
		Text
		{
			name = menuoptions_txt_fullscreen_params["name"],
			font = Green15Font,
			flags = kHAlignCenter + kVAlignCenter,
			label = "fullscreen.check",
			x = menuoptions_txt_fullscreen_params["x"]-5,
			y = menuoptions_txt_fullscreen_params["y"]-5,
			w = menuoptions_txt_fullscreen_params["w"]+10,
			h = menuoptions_txt_fullscreen_params["h"] + 10,
		},
		
		BeginGroup();
		
		MonopolyButton
		{
			name = "fullscreen.yes",
			graphics = radio_button_graphics,
			x = menuoptions_rad_button_fullon_params["x"],
			y = menuoptions_rad_button_fullon_params["y"],
			w = menuoptions_rad_button_fullon_params["w"] + 40,
			h = menuoptions_rad_button_fullon_params["h"],
			type = kRadio,
			command =
				function()
					OnFullScreen(true);
				end,
		},
		Text
		{
			name = menuoptions_txt_fullon_params["name"],
			label = "common.yes.label",
			font = Green15Font,
			flags = kHAlignCenter + kVAlignCenter,
			x = menuoptions_txt_fullon_params["x"] - 5,
			y = menuoptions_txt_fullon_params["y"] - 5,
			w = menuoptions_txt_fullon_params["w"] + 10,
			h = menuoptions_txt_fullon_params["h"] + 10,
		},
			
		MonopolyButton
		{
			name = "fullscreen.no",
			graphics = radio_button_graphics,
			x = menuoptions_rad_button_fulloff_params["x"],
			y = menuoptions_rad_button_fulloff_params["y"],
			w = menuoptions_rad_button_fulloff_params["w"] + 40,
			h = menuoptions_rad_button_fulloff_params["h"],
			type = kRadio,
			command =
				function()
					OnFullScreen(false);
				end,
		},
		Text
		{
			name = menuoptions_txt_fulloff_params["name"],
			label = "common.no.label",
			font = Green15Font,
			flags = kHAlignCenter + kVAlignCenter,
			x = menuoptions_txt_fulloff_params["x"] - 5,
			y = menuoptions_txt_fulloff_params["y"] - 5,
			w = menuoptions_txt_fulloff_params["w"] + 10,
			h = menuoptions_txt_fulloff_params["h"] + 10,
		},

		BeginGroup();
		
		-- Music volume
		Text
		{
			name = menuoptions_txt_musicvol_params["name"],
			label = "music.slider",
			font = Green15Font,
			flags = kHAlignCenter + kVAlignCenter,
			x = menuoptions_txt_musicvol_params["x"] - 5,
			y = menuoptions_txt_musicvol_params["y"] - 5,
			w = menuoptions_txt_musicvol_params["w"] + 10,
			h = menuoptions_txt_musicvol_params["h"] + 10,
		},
		
		Text
		{
			name = menuoptions_txt_musicvol_params["name"],
			label = "music.slider",
			font = Green15Font,
			flags = kHAlignCenter + kVAlignCenter,
			x = menuoptions_txt_musicvol_params["x"] - 5,
			y = menuoptions_txt_musicvol_params["y"] - 5,
			w = menuoptions_txt_musicvol_params["w"] + 10,
			h = menuoptions_txt_musicvol_params["h"] + 10,
		},
		
		Text
		{
			name = menuoptions_txt_musmin_params["name"],
			label = "common.min",
			font = Green15Font,
			flags = kHAlignCenter + kVAlignCenter,
			x = menuoptions_txt_musmin_params["x"] - 5,
			y = menuoptions_txt_musmin_params["y"] - 5,
			w = menuoptions_txt_musmin_params["w"] + 10,
			h = menuoptions_txt_musmin_params["h"] + 10,
		},
		
		Text
		{
			name = menuoptions_txt_musmax_params["name"],
			label = "common.max",
			font = Green15Font,
			flags = kHAlignCenter + kVAlignCenter,
			x = menuoptions_txt_musmax_params["x"] - 5,
			y = menuoptions_txt_musmax_params["y"] - 5,
			w = menuoptions_txt_musmax_params["w"] + 10,
			h = menuoptions_txt_musmax_params["h"] + 10,
		},
		
		SetStyle(RulesSliderStyle),
		
		SliderEx
		{
			name = "mus.slider",
			x = menuoptions_btn_slider_mus_params["x"] - 30,
			y = menuoptions_btn_slider_mus_params["y"],
			w = 75,
		},
		
		SetStyle(DefaultStyle),
		
		-- SFX volume
		Text
		{
			name = menuoptions_txt_sfxvol_params["name"],
			label = "sfx.slider",
			font = Green15Font,
			flags = kHAlignCenter + kVAlignCenter,
			x = menuoptions_txt_sfxvol_params["x"] - 5,
			y = menuoptions_txt_sfxvol_params["y"] - 5,
			w = menuoptions_txt_sfxvol_params["w"] + 10,
			h = menuoptions_txt_sfxvol_params["h"] + 10,
		},
		
		Text
		{
			name = menuoptions_txt_sfxmin_params["name"],
			label = "common.min",
			font = Green15Font,
			flags = kHAlignCenter + kVAlignCenter,
			x = menuoptions_txt_sfxmin_params["x"] - 5,
			y = menuoptions_txt_sfxmin_params["y"] - 5,
			w = menuoptions_txt_sfxmin_params["w"] + 10,
			h = menuoptions_txt_sfxmin_params["h"] + 10,
		},
		
		Text
		{
			name = menuoptions_txt_sfxmax_params["name"],
			label = "common.max",
			font = Green15Font,
			flags = kHAlignCenter + kVAlignCenter,
			x = menuoptions_txt_sfxmax_params["x"] - 5,
			y = menuoptions_txt_sfxmax_params["y"] - 5,
			w = menuoptions_txt_sfxmax_params["w"] + 10,
			h = menuoptions_txt_sfxmax_params["h"] + 10,
		},
		
		SetStyle(RulesSliderStyle),
		
		SliderEx
		{
			name = "sfx.slider",
			x = menuoptions_btn_slider_sfx_params["x"] - 30,
			y = menuoptions_btn_slider_sfx_params["y"],
			w = 75,
		},
		
		SetStyle(DefaultStyle),
	},
}