-- ****************
--   CAS LIST Display
-- ****************
dofile(LockOn_Options.script_path.."MPCD/indicator/MPCD_definitions.lua")
dofile(LockOn_Options.script_path.."MPCD/indicator/MENU/MPCD_BG.lua")
dofile(LockOn_Options.script_path.."MPCD/indicator/CAS/CAS_LST_MENU.lua")


-- DISPLAY
local Col_01 = -0.85
local Col_02 = -0.75
local Col_03 = -0.60
local Col_04 = -0.20
local Col_05 =  0.40
local Col_06 =  0.75

local Row_01 = 0.7

-- LABELS
local	label_req_ident					= CreateElement "ceStringPoly"
		label_req_ident.name			= "label_req_ident"
		label_req_ident.material		= mpcd_tpod_font
		label_req_ident.init_pos		= {Col_03, Row_01, 0.0}
		label_req_ident.alignment		= "LeftCenter"
		label_req_ident.value			= "REQ#"
		label_req_ident.stringdefs		= MPCD_default_font_size
Add_MPCD_Element(label_req_ident)

local	label_req_position				= CreateElement "ceStringPoly"
		label_req_position.name			= "label_req_position"
		label_req_position.material		= mpcd_tpod_font
		label_req_position.init_pos		= {Col_04, Row_01, 0.0}
		label_req_position.alignment	= "LeftCenter"
		label_req_position.value		= "UTM"
		label_req_position.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(label_req_position)

local	label_req_time					= CreateElement "ceStringPoly"
		label_req_time.name				= "label_req_time"
		label_req_time.material			= mpcd_tpod_font
		label_req_time.init_pos			= {Col_05, Row_01, 0.0}
		label_req_time.alignment		= "LeftCenter"
		label_req_time.value			= "TIME"
		label_req_time.stringdefs		= MPCD_default_font_size
Add_MPCD_Element(label_req_time)

-- DATA
Row_01 = Row_01 - 0.08

for i = 1, 18 do
	local	rcrd_req_slct				= CreateElement "ceStringPoly"
			rcrd_req_slct.name			= "rcrd_req_slct" .. string.format("%02d", i)
			rcrd_req_slct.material		= mpcd_tpod_font
			rcrd_req_slct.init_pos		= {Col_01 - 0.05, Row_01, 0.0}
			rcrd_req_slct.alignment		= "LeftCenter"
			rcrd_req_slct.value			= "*"
			rcrd_req_slct.stringdefs	= MPCD_default_font_size
			rcrd_req_slct.controllers	= {{"CAS_BRIEF_Selected", i - 1}}
	Add_MPCD_Element(rcrd_req_slct)
	
	local	rcrd_req_ident				= CreateElement "ceStringPoly"
			rcrd_req_ident.name			= "rcrd_req_ident" .. string.format("%02d", i)
			rcrd_req_ident.material		= mpcd_tpod_font
			rcrd_req_ident.init_pos		= {Col_01, Row_01, 0.0}
			rcrd_req_ident.alignment	= "LeftCenter"
			rcrd_req_ident.value		= string.format("%d", i)
			rcrd_req_ident.stringdefs	= MPCD_default_font_size
	Add_MPCD_Element(rcrd_req_ident)
	
	local	rcrd_req_cas				= CreateElement "ceStringPoly"
			rcrd_req_cas.name			= "rcrd_req_cas" .. string.format("%02d", i)
			rcrd_req_cas.material		= mpcd_tpod_font
			rcrd_req_cas.init_pos		= {Col_02, Row_01, 0.0}
			rcrd_req_cas.alignment		= "LeftCenter"
			rcrd_req_cas.value			= "CAS"
			rcrd_req_cas.stringdefs		= MPCD_default_font_size
	Add_MPCD_Element(rcrd_req_cas)
	
	local	rcrd_req_name				= CreateElement "ceStringPoly"
			rcrd_req_name.name			= "rcrd_req_name" .. string.format("%02d", i)
			rcrd_req_name.material		= mpcd_tpod_font
			rcrd_req_name.init_pos		= {Col_03, Row_01, 0.0}
			rcrd_req_name.alignment		= "LeftCenter"
			rcrd_req_name.formats		= {"%d"}
			rcrd_req_name.stringdefs	= MPCD_default_font_size
			rcrd_req_name.controllers	= {{"CAS_BRIEF_Req_Ident", i - 1}}
	Add_MPCD_Element(rcrd_req_name)
	
	local	rcrd_req_MGRS				= CreateElement "ceStringPoly"
			rcrd_req_MGRS.name			= "rcrd_req_MGRS" .. string.format("%02d", i)
			rcrd_req_MGRS.material		= mpcd_tpod_font
			rcrd_req_MGRS.init_pos		= {Col_04, Row_01, 0.0}
			rcrd_req_MGRS.alignment		= "LeftCenter"
			rcrd_req_MGRS.formats		= {"%s %s %d%d"}
			rcrd_req_MGRS.stringdefs	= MPCD_default_font_size
			rcrd_req_MGRS.controllers	= {{"CAS_BRIEF_Req_MGRS", i - 1}}
	Add_MPCD_Element(rcrd_req_MGRS)
	
	local	rcrd_req_time				= CreateElement "ceStringPoly"
			rcrd_req_time.name			= "rcrd_req_time" .. string.format("%02d", i)
			rcrd_req_time.material		= mpcd_tpod_font
			rcrd_req_time.init_pos		= {Col_05, Row_01, 0.0}
			rcrd_req_time.alignment		= "LeftCenter"
			rcrd_req_time.formats		= {"%02d:%02d:%02d.%d"}
			rcrd_req_time.stringdefs	= MPCD_default_font_size
			rcrd_req_time.controllers	= {{"CAS_BRIEF_Req_Time", i - 1}}
	Add_MPCD_Element(rcrd_req_time)
	
	local	rcrd_tgt_nmbr				= CreateElement "ceStringPoly"
			rcrd_tgt_nmbr.name			= "rcrd_tgt_nmbr" .. string.format("%02d", i)
			rcrd_tgt_nmbr.material		= mpcd_tpod_font
			rcrd_tgt_nmbr.init_pos		= {Col_06, Row_01, 0.0}
			rcrd_tgt_nmbr.alignment		= "LeftCenter"
			rcrd_tgt_nmbr.formats		= {"%s"}
			rcrd_tgt_nmbr.stringdefs	= MPCD_default_font_size
			rcrd_tgt_nmbr.controllers	= {{"CAS_BRIEF_TGT_Number", i - 1}}
	Add_MPCD_Element(rcrd_tgt_nmbr)
	
	Row_01 = Row_01 - 0.08
end
