require("scripts/styles/mainmenustyle.lua")
require("scripts/styles/loadingstyle.lua")

MakeDialog
{
	WndPurchaseConfirm
	{
		name = "WndPurchaseConfirm",
		w = 1024,
		h = 768,
		x = kCenter,
		y = kCenter,
		fit = true,		
			
		Bitmap 
		{
			x = kCenter,
			y = kCenter,
			image = "common/screens/dialog_box/dialog_background",
			name = "blgBackground",

			SetStyle(DialogContentStyle),

			Text
			{
				name = "txtDescription",
				label = "confirm_purchase",
				x = kCenter, y = kCenter,
				w = 400, h = 300,
				flags = kHAlignCenter + kVAlignCenter,
			},
	
			
		},
		-------------------------------------------------------------------
		-- make buttons

		SetStyle(OrangeButtonStyle),
		BlgButton
		{
			name= "btnYes",
			label= "yes",
			x = 330, y = 500,
			width = 250, height = 100,
			positionMatrix = { x = 10, y =10},
			graphics = {
				"common/screens/dialog_box/confirm_red",
				"",
				"",
				"",
			},
		    	command =
		        function()
		        	PurchaseSelectedItem();
		        	EnableWindow("btnFinish", true);
		        	CloseWindow();
		        end
		},
		
		SetStyle(GreenButtonStyle),
		
		BlgButton
		{
			name= "btnNo",
			label= "purchase_no",
			x = 500, y = 500,
			width = 240, height = 90,
			positionMatrix = { x = 10, y = 10},
			graphics = {
				"common/screens/dialog_box/cancel_green",
				"",
				"",
				"",
			},
		  	command =
		        function()
		        	DestroyPurchasePopUpWindow();
                    DestroyPurchaseVariantWindow();
                    RestoreOriginalUpgradeStatusForHoveredEntity()
		        	EnableWindow("btnFinish", true);
		        	CloseWindow();
		        end				
		},	
	},															
}
