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

techOffset = 160
ecoOffset = 175

MakeDialog
{
	WndPurchaseVariationItem
	{
		name = "WndPurchaseItemVariation",
		x = kCenter,
		y = kCenter,
		fit = true,
        imageAlpha = 1,

		Bitmap 
		{
			image = "common/screens/purchase/purchase_box_big",
			name = "blgBackground",
			
			 -- Image for the glow of the Technological variation
            Bitmap 
            {
                name = "2",
                image = "",
                x = kCenter - 125, y = 220,
            },
            
            -- Image for the glow of the Ecological variation
            Bitmap 
            {
                name = "3",
                image = "",
                x = kCenter + 215, y = 220,
            },
			
			 -- Image for the Technological variation
            Bitmap 
            {
                name = "0",
                image = "common/stations/massagetable/1",
                x = kCenter - 125, y = 220,
            },
            
            -- Image for the Ecological variation
            Bitmap 
            {
                name = "1",
                image = "common/stations/massagetable/1",
                x = kCenter + 215, y = 220,
            },
            
            -- Texts that will let the player know which variation
            -- is currently selected
            SetStyle(PurchaseVariantStatusStyle),
            Text
			{
				name = "txtEcoSelected",
				label = "currently_selected",
				x = kCenter - techOffset, y = 60,
				w = 200, h = 150,
				flags = kHAlignCenter,
                x = kCenter + ecoOffset, y = 220,
			},
            
            Text
			{
				name = "txtTechSelected",
				label = "currently_selected",
				x = kCenter - techOffset, y = 60,
				w = 200, h = 150,
				flags = kHAlignCenter,
                x = kCenter - techOffset, y = 220,
			},
            
            Text
			{
				name = "txtEcoSoonAvailable",
				label = "soon_available",
				x = kCenter - techOffset, y = 60,
				w = 200, h = 150,
				flags = kHAlignCenter,
                x = kCenter + ecoOffset, y = 220,
			},
            
            Text
			{
				name = "txtTechSoonAvailable",
				label = "soon_available",
				x = kCenter - techOffset, y = 60,
				w = 200, h = 150,
				flags = kHAlignCenter,
                x = kCenter - techOffset, y = 220,
			},
           
            
            -- Title for each of the variations
 			SetStyle(PurchaseTitleStyle),
			Text
			{
				name = "txtTitle",
				label = "technological",
				x = kCenter - techOffset, y = 60,
				w = 265, h = 150,
				flags = kHAlignCenter + kVAlignTop,
			},
            
            Text
			{
				name = "txtEcoTitle",
				label = "ecological",
				x = kCenter + ecoOffset, y = 60,
				w = 265, h = 150,
				flags = kHAlignCenter + kVAlignTop,
			},
            
            Bitmap 
            {
                image = "common/stations/gear",
                x = kCenter - techOffset - 145, y = 45,
            },
            
            Bitmap 
            {
                image = "common/stations/leaf",
                x = kCenter + ecoOffset - 120, y = 45,
            },

            -- Descriptions for each of the variations
			SetStyle(PurchaseContentStyle),
			Text 
			{
				name = "txtDescription",
				label = "",
				x = kCenter - techOffset, y = 300,
				w = 310, h = 110,
				flags = kHAlignCenter + kVAlignCenter,
			},
            
            Text 
			{
				name = "txtEcoDescription",
				label = "",
				x = kCenter + ecoOffset, y = 300,
				w = 310, h = 110,
				flags = kHAlignCenter + kVAlignCenter,
			},
    
            -- Cost of each of the variations
			Text 
			{
				name = "txtCost",
				label = "",
				x = kCenter - techOffset - 30, y = 470,
				w = 200, h = kMax,
				flags = kHAlignRight+ kVAlignTop,
			},
            
            Text 
			{
				name = "txtEcoCost",
				label = "",
				x = kCenter + ecoOffset - 30, y = 470,
				w = 200, h = kMax,
				flags = kHAlignRight+ kVAlignTop,
			},
            
            -- The cash the player currently owns
             Text 
			{
				name = "txtCash",
				label = "",
				x = kCenter, y = 360,
				w = kMax, h = kMax,
				flags = kHAlignCenter + kVAlignCenter,
			},
            
            SetStyle(InternalButtonStyle),		
			
            -- Back button
            BlgButton
		    {
			    x = 300,
			    y = 485,
			    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()
                        DestroyPurchaseVariantWindow()
                    end
		    },
		},
	}
}