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

MakeDialog
{
	WndPurchaseItem
	{
		name = "WndPurchaseItem",
		x = kCenter-50,
		y= kCenter,
		
		fit = true,

		Bitmap 
		{
			image = "common/screens/purchase/purchase_box",
			name = "blgBackground",

			SetStyle(PurchaseTitleStyle),

			Text
			{
				name = "txtTitle",
				-- text will be set in c++
				label = "",
				x = kCenter, y = 65,
				w = 400, h = 150,
				flags = kHAlignCenter + kVAlignTop,
			},

			SetStyle(PurchaseContentStyle),

			Text 
			{
				name = "txtDescription",
				-- text will be set in c++
				label = "",
				x = kCenter - 5, y = 110,
				w = 410, h = 130,
				flags = kHAlignCenter + kVAlignCenter,
			},
			
			Text 
			{
				name = "txtDisposablaCash",
				-- text will be set in c++
				label = "",
				x = kCenter + 10, y = 240,
				w = 200, h = kMax,
				flags = kHAlignCenter + kVAlignTop,
			},				
			Text 
			{
				name = "txtCost",
				-- text will be set in c++
				label = "",
				x = kCenter + 10, y = 260,
				w = 200, h = kMax,
				flags = kHAlignCenter + kVAlignTop,
			},
            
            SetStyle(InternalButtonStyle),	
            
            -- Buy button
            BlgButton
		    {
			    x = 60,
			    y = 270,
			    width = 400, height = 200,
			    positionMatrix = { x = 20, y = 15 },
                labelMatrix = {x = 0, y = -1},
			    graphics = {
				    "common/screens/dialog_box/confirm_red",
				    "",
				    "",
				    "",
                },
		    	label = "buy",
    			command =  
                    function()
                        if ShowConfirmBuyWindow() then
                            DoModal("scripts/windows/wndpurchaseconfirm.lua")
                        end
                    end
		    },
            
            -- Back button
            BlgButton
		    {
			    x = 240,
			    y = 270,
			    width = 400, height = 200,
			    positionMatrix = { x = 20, y = 15 },
                labelMatrix = {x = 0, y = -1},
			    graphics = {
				    "common/screens/dialog_box/cancel_green",
				    "",
				    "",
				    "",
                },
		    	label="back",
    			command =  
                    function()
                        DestroyPurchaseWindow()
                    end
		    },
		}
	}
}