require( "scripts/style.lua" );

BlendNameFont = {
  standardFont,
  38,
  Color(255,255,255,255),
};

WineClassFont = {
  "fonts/wineclass.mvec",
  10,
  Color(51,13,0,255),
};

QtyFont = {
  stdLegibleFont,
  18,
  Color(51,13,0,255),
};


MakeDialog
{
	Blocker
	{
		fit = true,
		Bitmap
		{
			image="backgrounds/shade",
			alpha = 0.99,
		},
		BlendSelector
		{
			x = 250, y = 120,
			w = 532, h = 400,
			center_blend_x = 270,
			center_blend_y = 144,
			--blend_separation_x = 80,
			blend_separation_x = 124,
			blend_separation_y = 0,
			
			slide_factor = 0.6,
			slide_tolerance = 0.01,
			
			initial_blend = getBlendInProduction(),
			
			
			Text
			{
				name = "blend_title",
				x = 0, y = 240,
				w = kMax, h = 80,
				flags = kHAlignCenter + kVAlignCenter,
				font = BlendNameFont,
			},
			--Bitmap
			--{
			--	fit=true,
			--	x=kCenter, y=300,
			--	image = "buttons/change_blend",
			--},
			Text
			{
				name = "region_warning",
				x = 0, y = 300,
				w = kMax, h = 80,
				flags = kHAlignCenter + kVAlignCenter,
				font = 
				{
					standardFont,
					28,
					Color(255,255,255,255),
				},
				-- @TODO: Move this text to string table
				--label = "#<outline color=\"a00a0a\" size='2'>You cannot produce this blend on this winery</outline>",
			},
			Button
			{
				name = "select_blend",
				fit=true,
				x=kCenter, y=300,
				graphics = 
				{
					"buttons/decoidle",
					"buttons/decodown",
					"buttons/decoover",
				},
				tx=0, ty=0,
				tw=kMax, th=kMax,
				flags = kHAlignCenter + kVAlignCenter,
				label = "#<outline color=\"4aa04a\" size='2'>"..GetString("change_blend").."</outline>",
				command = function()
					selectBlend(getViewingBlend());
				end,
			},
			Button
			{
				name = "keep_blend",
				fit=true,
				x=kCenter, y=300,
				graphics = 
				{
					"buttons/decoidle",
					"buttons/decodown",
					"buttons/decoover",
				},
				tx=0, ty=0,
				tw=kMax, th=kMax,
				flags = kHAlignCenter + kVAlignCenter,
				label = "#<outline color=\"4aa04a\" size='2'>"..GetString("keep_blend").."</outline>",
				command = function()
					closeBlendSelector();
				end,
			},
		},
		Button
		{
			name = "next",
			x = 682, y = 260,
			graphics = 
			{
				"buttons/arrowidle",
				"buttons/arrowdown",
				"buttons/arrowover",
			},
			command = function()
				NextBlend();
			end,
		},
		Button
		{
			name = "prev",
			x = 290, y = 260,
			hflip  = true,
			graphics = 
			{
				"buttons/arrowidle",
				"buttons/arrowdown",
				"buttons/arrowover",
			},
			command = function()
				PrevBlend();
			end,
		},
	},
} -- MakeDialog
