require("scripts/styles/style.lua");

local function CreateContents()
	local contents = {
		{
			BlgContainer
			{
				transformMatrix = {x = 428, y = 300},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter1Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/r",
						center = {x = 28, y = 82},
						transformMatrix = {x = 0, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter2Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/e",
						center = {x = 28, y = 82},
						transformMatrix = {x = 56, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter3Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/a",
						center = {x = 28, y = 82},
						transformMatrix = {x = 112, y = 0},
					},
				},
				
				BlgMovieClip
				{
					SetStyle(Letter4Style),				
					repeatCount = 1,
					BlgBitmap
					{
						image="level/core/common/textures/init/d",
						center = {x = 28, y = 82},
						transformMatrix = {x = 168, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter5Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/y",
						center = {x = 28, y = 82},
						transformMatrix = {x = 224, y = 0},
					},
				},
			},
		},
		
		{
			BlgContainer
			{
				transformMatrix = {x = 338, y = 300},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter1Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/l",
						center = {x = 28, y = 82},
						transformMatrix = {x = 84, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter2Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/e",
						center = {x = 28, y = 82},
						transformMatrix = {x = 140, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter3Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/v",
						center = {x = 28, y = 82},
						transformMatrix = {x = 196, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter4Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/e",
						center = {x = 28, y = 82},
						transformMatrix = {x = 252, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter5Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/l",
						center = {x = 28, y = 82},
						transformMatrix = {x = 308, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter1Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/c",
						center = {x = 28, y = 82},
						transformMatrix = {x = 0, y = 100},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter2Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/o",
						center = {x = 40, y = 82},
						transformMatrix = {x = 64, y = 100},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter3Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/m",
						center = {x = 28, y = 82},
						transformMatrix = {x = 124, y = 100},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter4Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/p",
						center = {x = 28, y = 82},
						transformMatrix = {x = 180, y = 100},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter5Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/l",
						center = {x = 28, y = 82},
						transformMatrix = {x = 236, y = 100},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter6Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/e",
						center = {x = 28, y = 82},
						transformMatrix = {x = 292, y = 100},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter7Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/t",
						center = {x = 28, y = 82},
						transformMatrix = {x = 348, y = 100},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter8Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/e",
						center = {x = 28, y = 82},
						transformMatrix = {x = 404, y = 100},
					},
				},
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big.lua",
				playTime = -1,
				transformMatrix = {x = 250, y = 280},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big.lua",
				playTime = -1,
				transformMatrix = {x = 774, y = 280},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big.lua",
				playTime = -1,
				transformMatrix = {x = 300, y = 150},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big.lua",
				playTime = -1,
				transformMatrix = {x = 724, y = 150},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big_glow.lua",
				playTime = -1,
				transformMatrix = {x = 350, y = 260},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big_glow.lua",
				playTime = -1,
				transformMatrix = {x = 650, y = 260},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
		},
		
		{
			BlgContainer
			{
				transformMatrix = {x = 316, y = 300},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter1Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/e",
						center = {x = 28, y = 82},
						transformMatrix = {x = 0, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter2Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/x",
						center = {x = 28, y = 82},
						transformMatrix = {x = 56, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter3Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/c",
						center = {x = 28, y = 82},
						transformMatrix = {x = 112, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter4Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/e",
						center = {x = 28, y = 82},
						transformMatrix = {x = 168, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter5Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/l",
						center = {x = 28, y = 82},
						transformMatrix = {x = 224, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter6Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/l",
						center = {x = 28, y = 82},
						transformMatrix = {x = 280, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter7Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/e",
						center = {x = 28, y = 82},
						transformMatrix = {x = 336, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter8Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/n",
						center = {x = 28, y = 82},
						transformMatrix = {x = 392, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter9Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/t",
						center = {x = 28, y = 82},
						transformMatrix = {x = 448, y = 0},
					},
				},
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big.lua",
				playTime = -1,
				transformMatrix = {x = 250, y = 280},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big.lua",
				playTime = -1,
				transformMatrix = {x = 774, y = 280},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big.lua",
				playTime = -1,
				transformMatrix = {x = 300, y = 150},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big.lua",
				playTime = -1,
				transformMatrix = {x = 724, y = 150},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big_glow.lua",
				playTime = -1,
				transformMatrix = {x = 350, y = 260},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big_glow.lua",
				playTime = -1,
				transformMatrix = {x = 650, y = 260},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big_glow.lua",
				playTime = -1,
				transformMatrix = {x = 350, y = 260},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
			
			BlgParticles{
				path = "level/core/common/particles/pfx_core_station_upgrade_big_glow.lua",
				playTime = -1,
				transformMatrix = {x = 650, y = 260},
				bindGenerator = true,
				useGlobalRenderOrigin = true,
			},
		},
		
		{
			BlgContainer
			{
				transformMatrix = {x = 448, y = 300},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter1Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/y",
						center = {x = 28, y = 82},
						transformMatrix = {x = 28, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter2Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/o",
						center = {x = 40, y = 82},
						transformMatrix = {x = 92, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter3Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/u",
						center = {x = 28, y = 82},
						transformMatrix = {x = 156, y = 0},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter4Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/l",
						center = {x = 28, y = 82},
						transformMatrix = {x = 0, y = 100},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter5Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/o",
						center = {x = 40, y = 82},
						transformMatrix = {x = 64, y = 100},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter5Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/s",
						center = {x = 28, y = 82},
						transformMatrix = {x = 128, y = 100},
					},
				},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter5Style),				
					BlgBitmap
					{
						image="level/core/common/textures/init/e",
						center = {x = 28, y = 82},
						transformMatrix = {x = 184, y = 100},
					},
				},
			},
		},
		
		{
			BlgContainer
			{
				transformMatrix = {x = 0, y = 200},
				
				BlgMovieClip
				{
					repeatCount = 1,
					SetStyle(Letter1Style),
					BlgText{
						label = "upgrade_mode",
						flags = kHAlignCenter + kVAlignCenter,
						transformMatrix = {x = 264, y = 2},
						w = 500, h = 300,
						font = {
							standardFont,
							80,
							Color(0, 0, 0),
							alpha = 0.5,
						},
					},			
					BlgText{
						label = "upgrade_mode",
						flags = kHAlignCenter + kVAlignCenter,
						transformMatrix = {x = 262, y = 0},
						transformationPoint = {x = 0.5, y = 0.5},
						w = 500, h = 300,
						font = {
							standardFont,
							80,
							Color(255, 255, 255),
						},
					},
				},
			},
		},
	};

	return Group(contents[gDialogTable.status]);
end

MakeState{
	type = "StateMessage",
	time = 4000,

	CreateContents();
};
