-- ******************************************
--   Emergency Procedures Checklist Display
-- ******************************************
dofile(LockOn_Options.script_path.."MPCD/indicator/MPCD_definitions.lua")
dofile(LockOn_Options.script_path.."MPCD/indicator/MENU/MPCD_BG.lua")

-- MAIN MENU
local	mpcd_mm_btn_01				= CreateElement "ceStringPoly"
		mpcd_mm_btn_01.name			= "mpcd_mm_btn_01"
		mpcd_mm_btn_01.material		= mpcd_tpod_font
		mpcd_mm_btn_01.init_pos		= mpcd_btn_01_pos
		mpcd_mm_btn_01.alignment	= "CenterCenter"
		mpcd_mm_btn_01.value		= "W\nA\nR\nN"
		mpcd_mm_btn_01.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_01)

local	mpcd_mm_btn_02				= CreateElement "ceStringPoly"
		mpcd_mm_btn_02.name			= "mpcd_mm_btn_02"
		mpcd_mm_btn_02.material		= mpcd_tpod_font
		mpcd_mm_btn_02.init_pos		= mpcd_btn_02_pos
		mpcd_mm_btn_02.alignment	= "CenterCenter"
		mpcd_mm_btn_02.value		= "C\nA\nU\nT"
		mpcd_mm_btn_02.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_02)

local	mpcd_mm_btn_03				= CreateElement "ceStringPoly"
		mpcd_mm_btn_03.name			= "mpcd_mm_btn_03"
		mpcd_mm_btn_03.material		= mpcd_tpod_font
		mpcd_mm_btn_03.init_pos		= mpcd_btn_03_pos
		mpcd_mm_btn_03.alignment	= "CenterCenter"
		mpcd_mm_btn_03.value		= "E\nL\nE\nC"
		mpcd_mm_btn_03.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_03)

local	mpcd_mm_btn_04				= CreateElement "ceStringPoly"
		mpcd_mm_btn_04.name			= "mpcd_mm_btn_04"
		mpcd_mm_btn_04.material		= mpcd_tpod_font
		mpcd_mm_btn_04.init_pos		= mpcd_btn_04_pos
		mpcd_mm_btn_04.alignment	= "CenterCenter"
		mpcd_mm_btn_04.value		= "A\nS\nY\nM"
		mpcd_mm_btn_04.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_04)

local	mpcd_mm_btn_05				= CreateElement "ceStringPoly"
		mpcd_mm_btn_05.name			= "mpcd_mm_btn_05"
		mpcd_mm_btn_05.material		= mpcd_tpod_font
		mpcd_mm_btn_05.init_pos		= mpcd_btn_05_pos
		mpcd_mm_btn_05.alignment	= "CenterCenter"
		mpcd_mm_btn_05.value		= "T\n/\nO"
		mpcd_mm_btn_05.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_05)

local	mpcd_mm_btn_06a				= CreateElement "ceStringPoly"
		mpcd_mm_btn_06a.name		= "mpcd_mm_btn_06a"
		mpcd_mm_btn_06a.material	= mpcd_tpod_font
		mpcd_mm_btn_06a.init_pos	= {-0.65,  0.92, 0}
		mpcd_mm_btn_06a.alignment	= "CenterCenter"
		mpcd_mm_btn_06a.value		= "GEAR"
		mpcd_mm_btn_06a.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_06a)

local	mpcd_mm_btn_06b				= CreateElement "ceStringPoly"
		mpcd_mm_btn_06b.name		= "mpcd_mm_btn_06b"
		mpcd_mm_btn_06b.material	= mpcd_tpod_font
		mpcd_mm_btn_06b.init_pos	= {-0.65, 0.86, 0}
		mpcd_mm_btn_06b.alignment	= "CenterCenter"
		mpcd_mm_btn_06b.value		= "LAND"
		mpcd_mm_btn_06b.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_06b)

local	mpcd_mm_btn_07a				= CreateElement "ceStringPoly"
		mpcd_mm_btn_07a.name		= "mpcd_mm_btn_07a"
		mpcd_mm_btn_07a.material	= mpcd_tpod_font
		mpcd_mm_btn_07a.init_pos	= {-0.33,  0.92, 0}
		mpcd_mm_btn_07a.alignment	= "CenterCenter"
		mpcd_mm_btn_07a.value		= "EJCT"
		mpcd_mm_btn_07a.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_07a)

local	mpcd_mm_btn_07b				= CreateElement "ceStringPoly"
		mpcd_mm_btn_07b.name		= "mpcd_mm_btn_07b"
		mpcd_mm_btn_07b.material	= mpcd_tpod_font
		mpcd_mm_btn_07b.init_pos	= {-0.33, 0.86, 0}
		mpcd_mm_btn_07b.alignment	= "CenterCenter"
		mpcd_mm_btn_07b.value		= "DTCH"
		mpcd_mm_btn_07b.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_07b)

local	mpcd_mm_btn_08				= CreateElement "ceStringPoly"
		mpcd_mm_btn_08.name			= "mpcd_mm_btn_08"
		mpcd_mm_btn_08.material		= mpcd_tpod_font
		mpcd_mm_btn_08.init_pos		= mpcd_btn_08_pos
		mpcd_mm_btn_08.alignment	= "CenterCenter"
		mpcd_mm_btn_08.value		= "ENG"
		mpcd_mm_btn_08.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_08)

local	mpcd_mm_btn_09				= CreateElement "ceStringPoly"
		mpcd_mm_btn_09.name			= "mpcd_mm_btn_09"
		mpcd_mm_btn_09.material		= mpcd_tpod_font
		mpcd_mm_btn_09.init_pos		= mpcd_btn_09_pos
		mpcd_mm_btn_09.alignment	= "CenterCenter"
		mpcd_mm_btn_09.value		= "FUEL"
		mpcd_mm_btn_09.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_09)

local	mpcd_mm_btn_10a				= CreateElement "ceStringPoly"
		mpcd_mm_btn_10a.name		= "mpcd_mm_btn_10a"
		mpcd_mm_btn_10a.material	= mpcd_tpod_font
		mpcd_mm_btn_10a.init_pos	= { 0.65,  0.92, 0}
		mpcd_mm_btn_10a.alignment	= "CenterCenter"
		mpcd_mm_btn_10a.value		= "FLT"
		mpcd_mm_btn_10a.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_10a)

local	mpcd_mm_btn_10b				= CreateElement "ceStringPoly"
		mpcd_mm_btn_10b.name		= "mpcd_mm_btn_10b"
		mpcd_mm_btn_10b.material	= mpcd_tpod_font
		mpcd_mm_btn_10b.init_pos	= {0.65, 0.86, 0}
		mpcd_mm_btn_10b.alignment	= "CenterCenter"
		mpcd_mm_btn_10b.value		= "CONT"
		mpcd_mm_btn_10b.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_10b)

local	mpcd_mm_btn_11				= CreateElement "ceStringPoly"
		mpcd_mm_btn_11.name			= "mpcd_mm_btn_11"
		mpcd_mm_btn_11.material		= mpcd_tpod_font
		mpcd_mm_btn_11.init_pos		= mpcd_btn_11_pos
		mpcd_mm_btn_11.alignment	= "CenterCenter"
		mpcd_mm_btn_11.value		= "B\nR\nK\nS"
		mpcd_mm_btn_11.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_11)

local	mpcd_mm_btn_12				= CreateElement "ceStringPoly"
		mpcd_mm_btn_12.name			= "mpcd_mm_btn_12"
		mpcd_mm_btn_12.material		= mpcd_tpod_font
		mpcd_mm_btn_12.init_pos		= mpcd_btn_12_pos
		mpcd_mm_btn_12.alignment	= "CenterCenter"
		mpcd_mm_btn_12.value		= "F\nI\nR\nE"
		mpcd_mm_btn_12.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_12)

local	mpcd_mm_btn_13a				= CreateElement "ceStringPoly"
		mpcd_mm_btn_13a.name		= "mpcd_mm_btn_13a"
		mpcd_mm_btn_13a.material	= mpcd_tpod_font
		mpcd_mm_btn_13a.init_pos	= { 0.90, -0.00, 0}
		mpcd_mm_btn_13a.alignment	= "CenterCenter"
		mpcd_mm_btn_13a.value		= "S\nM\nO\nK"
		mpcd_mm_btn_13a.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_13a)

local	mpcd_mm_btn_13b				= CreateElement "ceStringPoly"
		mpcd_mm_btn_13b.name		= "mpcd_mm_btn_13b"
		mpcd_mm_btn_13b.material	= mpcd_tpod_font
		mpcd_mm_btn_13b.init_pos	= mpcd_btn_13_pos
		mpcd_mm_btn_13b.alignment	= "CenterCenter"
		mpcd_mm_btn_13b.value		= "F\nU\nM\nE"
		mpcd_mm_btn_13b.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_13b)

local	mpcd_mm_btn_14				= CreateElement "ceStringPoly"
		mpcd_mm_btn_14.name			= "mpcd_mm_btn_14"
		mpcd_mm_btn_14.material		= mpcd_tpod_font
		mpcd_mm_btn_14.init_pos		= mpcd_btn_14_pos
		mpcd_mm_btn_14.alignment	= "CenterCenter"
		mpcd_mm_btn_14.value		= "G\nU\nN"
		mpcd_mm_btn_14.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_14)

local	mpcd_mm_btn_15				= CreateElement "ceStringPoly"
		mpcd_mm_btn_15.name			= "mpcd_mm_btn_15"
		mpcd_mm_btn_15.material		= mpcd_tpod_font
		mpcd_mm_btn_15.init_pos		= mpcd_btn_15_pos
		mpcd_mm_btn_15.alignment	= "CenterCenter"
		mpcd_mm_btn_15.value		= "J\nE\nT\nT"
		mpcd_mm_btn_15.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_15)

local	mpcd_mm_btn_16a				= CreateElement "ceStringPoly"
		mpcd_mm_btn_16a.name		= "mpcd_mm_btn_16a"
		mpcd_mm_btn_16a.material	= mpcd_tpod_font
		mpcd_mm_btn_16a.init_pos	= { 0.65, -0.80, 0}
		mpcd_mm_btn_16a.alignment	= "CenterCenter"
		mpcd_mm_btn_16a.value		= "FLT"
		mpcd_mm_btn_16a.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_16a)

local	mpcd_mm_btn_16b				= CreateElement "ceStringPoly"
		mpcd_mm_btn_16b.name		= "mpcd_mm_btn_16b"
		mpcd_mm_btn_16b.material	= mpcd_tpod_font
		mpcd_mm_btn_16b.init_pos	= { 0.65, -0.86, 0}
		mpcd_mm_btn_16b.alignment	= "CenterCenter"
		mpcd_mm_btn_16b.value		= "CONT"
		mpcd_mm_btn_16b.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_16b)

local	mpcd_mm_btn_16c				= CreateElement "ceStringPoly"
		mpcd_mm_btn_16c.name		= "mpcd_mm_btn_16c"
		mpcd_mm_btn_16c.material	= mpcd_tpod_font
		mpcd_mm_btn_16c.init_pos	= mpcd_btn_16_pos
		mpcd_mm_btn_16c.alignment	= "CenterCenter"
		mpcd_mm_btn_16c.value		= "CNPY"
		mpcd_mm_btn_16c.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_16c)

local	mpcd_mm_btn_17a				= CreateElement "ceStringPoly"
		mpcd_mm_btn_17a.name		= "mpcd_mm_btn_17a"
		mpcd_mm_btn_17a.material	= mpcd_tpod_font
		mpcd_mm_btn_17a.init_pos	= { 0.33, -0.80, 0}
		mpcd_mm_btn_17a.alignment	= "CenterCenter"
		mpcd_mm_btn_17a.value		= "EMER"
		mpcd_mm_btn_17a.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_17a)

local	mpcd_mm_btn_17b				= CreateElement "ceStringPoly"
		mpcd_mm_btn_17b.name		= "mpcd_mm_btn_17b"
		mpcd_mm_btn_17b.material	= mpcd_tpod_font
		mpcd_mm_btn_17b.init_pos	= { 0.33, -0.86, 0}
		mpcd_mm_btn_17b.alignment	= "CenterCenter"
		mpcd_mm_btn_17b.value		= "DC"
		mpcd_mm_btn_17b.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_17b)

local	mpcd_mm_btn_17c				= CreateElement "ceStringPoly"
		mpcd_mm_btn_17c.name		= "mpcd_mm_btn_17c"
		mpcd_mm_btn_17c.material	= mpcd_tpod_font
		mpcd_mm_btn_17c.init_pos	= mpcd_btn_17_pos
		mpcd_mm_btn_17c.alignment	= "CenterCenter"
		mpcd_mm_btn_17c.value		= "FAIL"
		mpcd_mm_btn_17c.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_17c)

local	mpcd_mm_btn_18				= CreateElement "ceStringPoly"
		mpcd_mm_btn_18.name			= "mpcd_mm_btn_18"
		mpcd_mm_btn_18.material		= mpcd_tpod_font
		mpcd_mm_btn_18.init_pos		= mpcd_btn_18_pos
		mpcd_mm_btn_18.alignment	= "CenterCenter"
		mpcd_mm_btn_18.value		= "MENU"
		mpcd_mm_btn_18.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_18)

local	mpcd_mm_btn_20				= CreateElement "ceStringPoly"
		mpcd_mm_btn_20.name			= "mpcd_mm_btn_20"
		mpcd_mm_btn_20.material		= mpcd_tpod_font
		mpcd_mm_btn_20.init_pos		= mpcd_btn_20_pos
		mpcd_mm_btn_20.alignment	= "CenterCenter"
		mpcd_mm_btn_20.value		= "NEXT"
		mpcd_mm_btn_20.stringdefs	= MPCD_default_font_size
		mpcd_mm_btn_20.controllers	= {{"EPCD_DataFrame_Next"}}
Add_MPCD_Element(mpcd_mm_btn_20)


-- SELECTED OPTIONS
local	EPCD_OPT_01					= create_mpcd_textured_box( 5, 4, 58, 153, nil, nil, 1)
		EPCD_OPT_01.name			= "EPCD_OPT_01"
		EPCD_OPT_01.init_pos		= mpcd_btn_01_pos
		EPCD_OPT_01.controllers		= {{"EPCD_Selected_Frame", 1}}
Add_MPCD_VIDEO_Element(EPCD_OPT_01)

local	EPCD_OPT_02					= create_mpcd_textured_box( 5, 4, 58, 153, nil, nil, 1)
		EPCD_OPT_02.name			= "EPCD_OPT_02"
		EPCD_OPT_02.init_pos		= mpcd_btn_02_pos
		EPCD_OPT_02.controllers		= {{"EPCD_Selected_Frame", 2}}
Add_MPCD_VIDEO_Element(EPCD_OPT_02)

local	EPCD_OPT_03					= create_mpcd_textured_box( 5, 4, 58, 153, nil, nil, 1)
		EPCD_OPT_03.name			= "EPCD_OPT_03"
		EPCD_OPT_03.init_pos		= mpcd_btn_03_pos
		EPCD_OPT_03.controllers		= {{"EPCD_Selected_Frame", 3}}
Add_MPCD_VIDEO_Element(EPCD_OPT_03)

local	EPCD_OPT_04					= create_mpcd_textured_box( 5, 4, 58, 153, nil, nil, 1)
		EPCD_OPT_04.name			= "EPCD_OPT_04"
		EPCD_OPT_04.init_pos		= mpcd_btn_04_pos
		EPCD_OPT_04.controllers		= {{"EPCD_Selected_Frame", 4}}
Add_MPCD_VIDEO_Element(EPCD_OPT_04)

local	EPCD_OPT_05					= create_mpcd_textured_box( 5, 4, 58, 153, nil, nil, 1)
		EPCD_OPT_05.name			= "EPCD_OPT_05"
		EPCD_OPT_05.init_pos		= mpcd_btn_05_pos
		EPCD_OPT_05.controllers		= {{"EPCD_Selected_Frame", 5}}
Add_MPCD_VIDEO_Element(EPCD_OPT_05)

local	EPCD_OPT_06					= create_mpcd_textured_box( 478, 594, 627, 699, nil, nil, 1)
		EPCD_OPT_06.name			= "EPCD_OPT_06"
		EPCD_OPT_06.init_pos		= mpcd_btn_06_pos
		EPCD_OPT_06.controllers		= {{"EPCD_Selected_Frame", 6}}
Add_MPCD_VIDEO_Element(EPCD_OPT_06)

local	EPCD_OPT_07					= create_mpcd_textured_box( 478, 594, 627, 699, nil, nil, 1)
		EPCD_OPT_07.name			= "EPCD_OPT_07"
		EPCD_OPT_07.init_pos		= mpcd_btn_07_pos
		EPCD_OPT_07.controllers		= {{"EPCD_Selected_Frame", 7}}
Add_MPCD_VIDEO_Element(EPCD_OPT_07)

local	EPCD_OPT_08					= create_mpcd_textured_box( 60, 4, 175, 50)
		EPCD_OPT_08.name			= "EPCD_OPT_08"
		EPCD_OPT_08.init_pos		= mpcd_btn_08_pos
		EPCD_OPT_08.controllers		= {{"EPCD_Selected_Frame", 8}}
Add_MPCD_VIDEO_Element(EPCD_OPT_08)

local	EPCD_OPT_09					= create_mpcd_textured_box( 60, 4, 175, 50)
		EPCD_OPT_09.name			= "EPCD_OPT_09"
		EPCD_OPT_09.init_pos		= mpcd_btn_09_pos
		EPCD_OPT_09.controllers		= {{"EPCD_Selected_Frame", 9}}
Add_MPCD_VIDEO_Element(EPCD_OPT_09)

local	EPCD_OPT_10					= create_mpcd_textured_box( 478, 594, 627, 699, nil, nil, 1)
		EPCD_OPT_10.name			= "EPCD_OPT_10"
		EPCD_OPT_10.init_pos		= { 0.65,  0.87, 0}
		EPCD_OPT_10.controllers		= {{"EPCD_Selected_Frame", 10}}
Add_MPCD_VIDEO_Element(EPCD_OPT_10)

local	EPCD_OPT_11					= create_mpcd_textured_box( 5, 4, 58, 153, nil, nil, 1)
		EPCD_OPT_11.name			= "EPCD_OPT_11"
		EPCD_OPT_11.init_pos		= mpcd_btn_11_pos
		EPCD_OPT_11.controllers		= {{"EPCD_Selected_Frame", 11}}
Add_MPCD_VIDEO_Element(EPCD_OPT_11)

local	EPCD_OPT_12					= create_mpcd_textured_box( 5, 4, 58, 153, nil, nil, 1)
		EPCD_OPT_12.name			= "EPCD_OPT_12"
		EPCD_OPT_12.init_pos		= mpcd_btn_12_pos
		EPCD_OPT_12.controllers		= {{"EPCD_Selected_Frame", 12}}
Add_MPCD_VIDEO_Element(EPCD_OPT_12)

local	EPCD_OPT_13					= create_mpcd_textured_box( 360, 594, 464, 742, nil, nil, 1)
		EPCD_OPT_13.name			= "EPCD_OPT_13"
		EPCD_OPT_13.init_pos		= mpcd_btn_13_pos
		EPCD_OPT_13.controllers		= {{"EPCD_Selected_Frame", 13}}
Add_MPCD_VIDEO_Element(EPCD_OPT_13)

local	EPCD_OPT_14					= create_mpcd_textured_box( 5, 4, 58, 153, nil, nil, 1)
		EPCD_OPT_14.name			= "EPCD_OPT_14"
		EPCD_OPT_14.init_pos		= mpcd_btn_14_pos
		EPCD_OPT_14.controllers		= {{"EPCD_Selected_Frame", 14}}
Add_MPCD_VIDEO_Element(EPCD_OPT_14)

local	EPCD_OPT_15					= create_mpcd_textured_box( 5, 4, 58, 153, nil, nil, 1)
		EPCD_OPT_15.name			= "EPCD_OPT_15"
		EPCD_OPT_15.init_pos		= mpcd_btn_15_pos
		EPCD_OPT_15.controllers		= {{"EPCD_Selected_Frame", 15}}
Add_MPCD_VIDEO_Element(EPCD_OPT_15)

local	EPCD_OPT_16					= create_mpcd_textured_box( 478, 594, 627, 699, nil, nil, 1)
		EPCD_OPT_16.name			= "EPCD_OPT_16"
		EPCD_OPT_16.init_pos		= { 0.65, -0.85, 0}
		EPCD_OPT_16.controllers		= {{"EPCD_Selected_Frame", 16}}
Add_MPCD_VIDEO_Element(EPCD_OPT_16)

local	EPCD_OPT_17					= create_mpcd_textured_box( 478, 594, 627, 699, nil, nil, 1)
		EPCD_OPT_17.name			= "EPCD_OPT_17"
		EPCD_OPT_17.init_pos		= { 0.33, -0.85, 0}
		EPCD_OPT_17.controllers		= {{"EPCD_Selected_Frame", 17}}
Add_MPCD_VIDEO_Element(EPCD_OPT_17)

-- DATA FRAMES
local text_line = 0.75
local j = 0
local i = 1

for i = 1, 17 do
	-- NO DATA
	local	no_data_frm_warn				= CreateElement "ceStringPoly"
			no_data_frm_warn.name			= "no_data_frm_warn" .. string.format("%02d", i)
			no_data_frm_warn.material		= mpcd_tpod_font
			no_data_frm_warn.init_pos		= {0, 0, 0}
			no_data_frm_warn.alignment		= "CenterCenter"
			no_data_frm_warn.value			= "NO DATA FRAME"
			no_data_frm_warn.stringdefs		= MPCD_large_font_size
			no_data_frm_warn.controllers	= {{"EPCD_No_DataFrame", i}}
	Add_MPCD_VIDEO_Element(no_data_frm_warn)
	
	-- DATA LINES
	text_line = 0.75
	
	for j = 0, 20 do
		local	data_frm_text				= CreateElement "ceStringPoly"
				data_frm_text.name			= "data_frm_text" .. string.format("%02d", i) .. string.format("%02d", j)
				data_frm_text.material		= mpcd_tpod_font
				data_frm_text.init_pos		= {-0.82, text_line, 0}
				data_frm_text.alignment		= "LeftCenter"
				data_frm_text.formats		= {"%s"}
				data_frm_text.stringdefs	= MPCD_data2_font_size
				data_frm_text.controllers	= {{"EPCD_DataFrame_Line", i, j}}
		Add_MPCD_VIDEO_Element(data_frm_text)
		
		text_line = text_line - 0.08
	end
	
end

