require( "scripts/style.lua" );


MakeDialog
{
	
	FaderWindow
	{
		wait=0,
		duration=100,
	--	--fit = true,
		w=1024,h=768,
	--	startalpha = 0,
		finalalpha = 0.99,
	--	skip = false,
		Bitmap
		{
			name="shade",
			image="backgrounds/shade",
			alpha=0.99,	
	
			Bitmap
			{
				name="grapes_inventory",
				image="gui/main/grapes",
				x=kCenter, y=kCenter,

				SetStyle(ButtonStdOkStyle),
				--ShadowedButton
				Button
				{
					--face = "buttons/stdok",
					--shadow = "buttons/stddone_shadow",
					clickSound = "audio/sfx/buttons/default_click.ogg",
					--displacement = 2,
					--font = StandardButtonFont,
					close = true,
					flags = 5,
					--mylabel = GetString("ok"),
					label = "ok",
					name = "ok",
					tw=kMax-8,
					th=kMax-2,
					x = kCenter,
					y = kMax - 165,
				};
				
				--alvarinho
				Bitmap
				{
					name="alvarinho",
					image="grapes/alvarinho",
					x=98, y=133, scale=0.70,
				},
				SetStyle(DialogTitleText),
				Text
				{
					x=140, y=139,
					name = "alvarinho_txt",
					label= "alvarinho",
					font = {standardFont,26,BlackColor},
				},
				
				
				--cabernet_sauvignon
				Bitmap
				{
					name="cabernet_sauvignon",
					image="grapes/cabernet_sauvignon",
					x=98, y=173, scale=0.70,
				},
				Text
				{
					x=140, y=179,
					name = "cabernet_sauvignon_txt",
					label= "cabernet_sauvignon",
					font = {standardFont,26,BlackColor},
				},

				--chardonnay
				Bitmap
				{
					name="chardonnay",
					image="grapes/chardonnay",
					x=98, y=213, scale=0.70,
				},
				Text
				{
					x=140, y=219,
					name = "chardonnay_txt",
					label= "chardonnay",
					font = {standardFont,26,BlackColor},
				},

				
				--gamay
				Bitmap
				{
					name="gamay",
					image="grapes/gamay",
					x=98, y=253, scale=0.70,
				},
				Text
				{
					x=140, y=259,
					name = "gamay_txt",
					label= "gamay",
					font = {standardFont,26,BlackColor},
				},

				
				--generic_grape
				Bitmap
				{
					name="generic_grape",
					image="grapes/generic_grape",
					x=98, y=293, scale=0.70,
				},
				Text
				{
					x=140, y=299,
					name = "generic_grape_txt",
					label= "generic_grape",
					font = {standardFont,26,BlackColor},
				},

				
				--gewurztraminer
				Bitmap
				{
					name="gewurztraminer",
					image="grapes/gewurztraminer",
					x=98, y=333, scale=0.70,
				},
				Text
				{
					x=140, y=339,
					name = "gewurztraminer_txt",
					label= "gewurztraminer",
					font = {standardFont,26,BlackColor},
				},

				--malbec
				Bitmap
				{
					name="malbec",
					image="grapes/malbec",
					x=98, y=373, scale=0.70,
				},
				Text
				{
					x=140, y=379,
					name = "malbec_txt",
					label= "malbec",
					font = {standardFont,26,BlackColor},
				},

				--merlot
				Bitmap
				{
					name="merlot",
					image="grapes/merlot",
					x=98, y=413, scale=0.70,
				},
				Text
				{
					x=140, y=419,
					name = "merlot_txt",
					label= "merlot",
					font = {standardFont,26,BlackColor},
				},

				
				--nebbiolo
				Bitmap
				{
					name="nebbiolo",
					image="grapes/nebbiolo",
					x=98, y=453, scale=0.70,
				},
				Text
				{
					x=140, y=459,
					name = "nebbiolo_txt",
					label= "nebbiolo",
					font = {standardFont,26,BlackColor},
				},

				
				--pinot_meunier
				Bitmap
				{
					name="pinot_meunier",
					image="grapes/pinot_meunier",
					x=598, y=133, scale=0.70,
				},
				Text
				{
					x=640, y=139,
					name = "pinot_meunier_txt",
					label= "pinot_meunier",
					font = {standardFont,26,BlackColor},
				},

				
				--pinot_noir
				Bitmap
				{
					name="pinot_noir",
					image="grapes/pinot_noir",
					x=598, y=173, scale=0.70,
				},
				Text
				{
					x=640, y=179,
					name = "pinot_noir_txt",
					label= "pinot_noir",
					font = {standardFont,26,BlackColor},
				},

				
				--riesling
				Bitmap
				{
					name="riesling",
					image="grapes/riesling",
					x=598, y=213, scale=0.70,
				},
				Text
				{
					x=640, y=219,
					name = "riesling_txt",
					label= "riesling",
					font = {standardFont,26,BlackColor},
				},

				
				--sangiovese
				Bitmap
				{
					name="sangiovese",
					image="grapes/sangiovese",
					x=598, y=253, scale=0.70,
				},
				Text
				{
					x=640, y=259,
					name = "sangiovese_txt",
					label= "sangiovese",
					font = {standardFont,26,BlackColor},
				},

				
				--sauvignon_blanc
				Bitmap
				{
					name="sauvignon_blanc",
					image="grapes/sauvignon_blanc",
					x=598, y=293, scale=0.70,
				},
				Text
				{
					x=640, y=299,
					name = "sauvignon_blanc_txt",
					label= "sauvignon_blanc",
					font = {standardFont,26,BlackColor},
				},

				
				--semillon
				Bitmap
				{
					name="semillon",
					image="grapes/semillon",
					x=598, y=333, scale=0.70,
				},
				Text
				{
					x=640, y=339,
					name = "semillon_txt",
					label= "semillon",
					font = {standardFont,26,BlackColor},
				},

				
				--syrah
				Bitmap
				{
					name="syrah",
					image="grapes/syrah",
					x=598, y=373, scale=0.70,
				},
				Text
				{
					x=640, y=379,
					name = "syrah_txt",
					label= "syrah",
					font = {standardFont,26,BlackColor},
				},

				
				--tempranillo
				Bitmap
				{
					name="tempranillo",
					image="grapes/tempranillo",
					x=598, y=413, scale=0.70,
				},
				Text
				{
					x=640, y=419,
					name = "tempranillo_txt",
					label= "tempranillo",
					font = {standardFont,26,BlackColor},
				},
			},
		},
	}
};

function CheckGrapes()

	if(HasThisSeed("alvarinho",1)==false) then
	EnableWindow("alvarinho", false);
	EnableWindow("alvarinho_txt", false);
	end

	if(HasThisSeed("cabernet_sauvignon",1)==false) then
		EnableWindow("cabernet_sauvignon", false);
		EnableWindow("cabernet_sauvignon_txt", false);
	end

	if(HasThisSeed("chardonnay",1)==false) then
		EnableWindow("chardonnay", false);
		EnableWindow("chardonnay_txt", false);
	end

	if(HasThisSeed("gamay",1)==false) then
		EnableWindow("gamay", false);
		EnableWindow("gamay_txt", false);
	end

	if(HasThisSeed("generic_grape",1)==false) then
		EnableWindow("generic_grape", false);
		EnableWindow("generic_grape_txt", false);
	end

	if(HasThisSeed("gewurztraminer",1)==false) then
		EnableWindow("gewurztraminer", false);
		EnableWindow("gewurztraminer_txt", false);
	end

	if(HasThisSeed("malbec",1)==false) then
		EnableWindow("malbec", false);
		EnableWindow("malbec_txt", false);
	end

	if(HasThisSeed("merlot",1)==false) then
		EnableWindow("merlot", false);
		EnableWindow("merlot_txt", false);
	end

	if(HasThisSeed("nebbiolo",1)==false) then
		EnableWindow("nebbiolo", false);
		EnableWindow("nebbiolo_txt", false);
	end

	if(HasThisSeed("pinot_meunier",1)==false) then
		EnableWindow("pinot_meunier", false);
		EnableWindow("pinot_meunier_txt", false);
	end

	if(HasThisSeed("pinot_noir",1)==false) then
		EnableWindow("pinot_noir", false);
		EnableWindow("pinot_noir_txt", false);
	end

	if(HasThisSeed("riesling",1)==false) then
		EnableWindow("riesling", false);
		EnableWindow("riesling_txt", false);
	end

	if(HasThisSeed("sangiovese",1)==false) then
		EnableWindow("sangiovese", false);
		EnableWindow("sangiovese_txt", false);
	end

	if(HasThisSeed("sauvignon_blanc",1)==false) then
		EnableWindow("sauvignon_blanc", false);
		EnableWindow("sauvignon_blanc_txt", false);
	end

	if(HasThisSeed("semillon",1)==false) then
		EnableWindow("semillon", false);
		EnableWindow("semillon_txt", false);
	end

	if(HasThisSeed("syrah",1)==false) then
		EnableWindow("syrah", false);
		EnableWindow("syrah_txt", false);
	end

	if(HasThisSeed("tempranillo",1)==false) then
		EnableWindow("tempranillo", false);
		EnableWindow("tempranillo_txt", false);
	end;

end

CheckGrapes();