require( "scripts/style.lua" );

function setFontSize(size)
	local temp = {
		standardFont,
		size,
		BlackColor
	}	
	return temp;	
end

MakeDialog
{
	name="hireviniculture",
    
    FaderWindow
	{
		wait=0,
		duration=100,
		fit = true,
		startalpha = 0,
		finalalpha = 1,
		skip = false,
    
		--Bitmap
		--{
		--	image="backgrounds/shade",
		--	alpha = 0.99,
		--},
		
		Bitmap
		{
			image="backgrounds/dialog",
			x=306,
			y=226,

			SetStyle(DialogTitleText),
			Text
			{
				name = "hiretitle",
				label= "hireprofessional_title",
			},

			SetStyle(DialogBodyText),
			Text
			{
				name = "hirebody",
				label= "hireprofessional",
				x = 53, y = 60,
				w = 298, h = 57,
				flags = kVAlignTop + kHAlignCenter,
			},
			
			Text
			{
				name = "production",
				font = setFontSize(30),
				x = 53, y = 166,
				w = 298, h = 32,
				flags = kVAlignCenter + kHAlignCenter,
				label = "#"..tostring(hireProd).." bushels/Day",
			},

			Text
			{
				name = "value",
				font = setFontSize(30),
				x = 53, y = 136,
				w = 298, h = 32,
				flags = kVAlignCenter + kHAlignCenter,
				label = "#$"..tostring(GetHiringPriceViniculture()),
			},
			
			Text
			{
				name = "servicename",
				font = setFontSize(30),
				label= "planting",
				x = 53, y = 100,
				w = 298, h = 32,
				flags = kVAlignCenter + kHAlignCenter,
			},

			SetStyle(ButtonStdOkStyle),
			--ShadowedButton
			Button
			{
				command= function()
						HireViniculture();
						ModalReturn(1);
					 end,
				clickSound = "audio/sfx/buttons/default_click.ogg",
				close = true,
				flags = 5,
				--mylabel = "hire",
				label = "hire",
				name = startname,
				x = 200,
				y = 200,
			},
			--ShadowedButton
			Button
			{
				--command=cancelfunction;
				command = function ()
						ModalReturn(0);
					end,
				clickSound = "audio/sfx/buttons/default_click.ogg",
				close = true,
				flags = 5,
				--mylabel = GetString("cancel"),
				label = "cancel",
				name = cancelname,
				x = 288,
				y = 200,
			},
		},
	},
	PlayPopupSound();
}

--SetLabel("value", tostring(GetHiringPriceViniculture()));
