--**********************
--  EHSD
--  STEERING MODE PAGE
--  WAYPOINT DATA
--**********************
local	fp_wpt_brg_deg				= CreateElement "ceStringPoly"
		fp_wpt_brg_deg.name			= "fp_wpt_brg_deg"
		fp_wpt_brg_deg.material		= mpcd_tpod_font
		fp_wpt_brg_deg.init_pos		= { 0.30,  0.80, 0}
		fp_wpt_brg_deg.alignment	= "LeftCenter"
		fp_wpt_brg_deg.formats		= {"%03d;"}
		fp_wpt_brg_deg.stringdefs	= MPCD_large_font_size
		fp_wpt_brg_deg.controllers	= {{"nav_wpt_valid"}, {"nav_wpt_brg"}}
Add_MPCD_VIDEO_Element(fp_wpt_brg_deg)

local	fp_wpt_rng_nm				= CreateElement "ceStringPoly"
		fp_wpt_rng_nm.name			= "fp_wpt_rng_nm"
		fp_wpt_rng_nm.material		= mpcd_tpod_font
		fp_wpt_rng_nm.init_pos		= { 0.90,  0.80, 0}
		fp_wpt_rng_nm.alignment		= "RightCenter"
		fp_wpt_rng_nm.formats		= {"%1.1f"}
		fp_wpt_rng_nm.stringdefs	= MPCD_large_font_size
		fp_wpt_rng_nm.controllers	= {{"nav_wpt_valid"}, {"nav_wpt_rng"}}
Add_MPCD_VIDEO_Element(fp_wpt_rng_nm)

local	fp_wpt_ttg				= CreateElement "ceStringPoly"
		fp_wpt_ttg.name			= "fp_wpt_ttg"
		fp_wpt_ttg.material		= mpcd_tpod_font
		fp_wpt_ttg.init_pos		= { 0.60,  0.70, 0}
		fp_wpt_ttg.alignment	= "CenterCenter"
		fp_wpt_ttg.formats		= {"%d:%02d"}
		fp_wpt_ttg.stringdefs	= MPCD_large_font_size
		fp_wpt_ttg.controllers	= {{"nav_wpt_valid"}, {"nav_wpt_ttg"}}
Add_MPCD_VIDEO_Element(fp_wpt_ttg)

-- NEEDLE
local	nav_wpt_ptr_c				= create_mpcd_textured_box( 48, 774, 89, 823, nil, 1150)
		nav_wpt_ptr_c.name			= "nav_wpt_ptr_c"
		nav_wpt_ptr_c.init_pos		= {0, 0, 0}
		nav_wpt_ptr_c.controllers	= {{"EHSD_MAP_EHSI"}, {"EHSD_CR_Centered"}, {"nav_wpt_brg_ptr_WP"}}
Add_MPCD_VIDEO_Element(nav_wpt_ptr_c)

local	nav_wpt_ptr_d					= create_mpcd_textured_box( 50, 775, 88, 818, nil, 1405)
		nav_wpt_ptr_d.name				= "nav_wpt_ptr_d"
		nav_wpt_ptr_d.init_pos			= {0, 0, 0}
		nav_wpt_ptr_d.parent_element	= MPCD_center.name
		nav_wpt_ptr_d.controllers		= {{"EHSD_MAP_EHSI"}, {"EHSD_CR_Decentered"}, {"nav_wpt_brg_ptr_WP"}}
Add_MPCD_VIDEO_Element(nav_wpt_ptr_d)

-- SYMBOLS
local EHSD_Scale = 0.5 * GetScale()

-- Steerpoints
local	fp_wpt_symbol					= create_mpcd_textured_box( 108, 886, 153, 932)
		fp_wpt_symbol.name				= "fp_wpt_symbol"
		fp_wpt_symbol.init_pos			= {0, 0, 0}
		fp_wpt_symbol.parent_element	= MPCD_center.name
		fp_wpt_symbol.controllers		= {{"EHSD_NOT_AWLS_Str"}, {"nav_wpt_pos_WYPT", EHSD_Scale}}
Add_MPCD_VIDEO_Element(fp_wpt_symbol)

local	fp_wpt_crs_line_bg					= CreateElement "ceSimpleLineObject"
		fp_wpt_crs_line_bg.name				= "fp_wpt_crs_line_bg"
		fp_wpt_crs_line_bg.material   		= mpcd_ehsd_lines_bg
		fp_wpt_crs_line_bg.width       		= 0.007
		fp_wpt_crs_line_bg.init_pos			= {0, 0, 0}
		fp_wpt_crs_line_bg.parent_element	= fp_wpt_symbol.name
		fp_wpt_crs_line_bg.controllers		= {{"nav_wpt_crs_line", mpcd_steering_modes["EHSD_STR_WPT"]}}
Add_MPCD_VIDEO_Element(fp_wpt_crs_line_bg)

local	fp_crs_arrow_bg 					= CreateElement "ceSimpleLineObject"
		fp_crs_arrow_bg.name 				= "fp_crs_arrow_bg"
		fp_crs_arrow_bg.material			= mpcd_ehsd_lines_bg
		fp_crs_arrow_bg.width				= 0.007
		fp_crs_arrow_bg.init_pos			= {0, 0, 0}
		fp_crs_arrow_bg.parent_element		= fp_wpt_symbol.name
		fp_crs_arrow_bg.controllers			= {{"nav_crs_arrow", mpcd_steering_modes["EHSD_STR_WPT"]}}
Add_MPCD_VIDEO_Element(fp_crs_arrow_bg)


local	fp_wpt_crs_line					= CreateElement "ceSimpleLineObject"
		fp_wpt_crs_line.name			= "fp_wpt_crs_line"
		fp_wpt_crs_line.material   		= mpcd_ehsd_lines_fg
		fp_wpt_crs_line.width       	= 0.005
		fp_wpt_crs_line.init_pos		= {0, 0, 0}
		fp_wpt_crs_line.parent_element	= fp_wpt_symbol.name
		fp_wpt_crs_line.controllers		= {{"nav_wpt_crs_line", mpcd_steering_modes["EHSD_STR_WPT"]}}
Add_MPCD_VIDEO_Element(fp_wpt_crs_line)

local	fp_crs_arrow 					= CreateElement "ceSimpleLineObject"
		fp_crs_arrow.name 				= "fp_crs_arrow"
		fp_crs_arrow.material			= mpcd_ehsd_lines_fg
		fp_crs_arrow.width				= 0.005
		fp_crs_arrow.init_pos			= {0, 0, 0}
		fp_crs_arrow.parent_element		= fp_wpt_symbol.name
		fp_crs_arrow.controllers        = {{"nav_crs_arrow", mpcd_steering_modes["EHSD_STR_WPT"]}}
Add_MPCD_VIDEO_Element(fp_crs_arrow)

local	fp_wpt_os_symbol				= create_mpcd_textured_box( 108, 826, 153, 872)
		fp_wpt_os_symbol.name			= "fp_wpt_os_symbol"
		fp_wpt_os_symbol.init_pos		= {0, 0, 0}
		fp_wpt_os_symbol.parent_element	= MPCD_center.name
		fp_wpt_os_symbol.controllers	= {{"nav_wpt_pos_OSWP", EHSD_Scale}}
Add_MPCD_VIDEO_Element(fp_wpt_os_symbol)

local	fp_wos_crs_line_bg					= CreateElement "ceSimpleLineObject"
		fp_wos_crs_line_bg.name				= "fp_wos_crs_line_bg"
		fp_wos_crs_line_bg.material   		= mpcd_ehsd_lines_bg
		fp_wos_crs_line_bg.width       		= 0.007
		fp_wos_crs_line_bg.init_pos			= {0, 0, 0}
		fp_wos_crs_line_bg.parent_element	= fp_wpt_os_symbol.name
		fp_wos_crs_line_bg.controllers		= {{"nav_wpt_crs_line", mpcd_steering_modes["EHSD_STR_WOS"]}}
Add_MPCD_VIDEO_Element(fp_wos_crs_line_bg)

local	fp_wos_crs_arrow_bg					= CreateElement "ceSimpleLineObject"
		fp_wos_crs_arrow_bg.name			= "fp_wos_crs_arrow_bg"
		fp_wos_crs_arrow_bg.material		= mpcd_ehsd_lines_bg
		fp_wos_crs_arrow_bg.width       	= 0.007
		fp_wos_crs_arrow_bg.init_pos		= {0, 0, 0}
		fp_wos_crs_arrow_bg.parent_element	= fp_wpt_os_symbol.name
		fp_wos_crs_arrow_bg.controllers		= {{"nav_crs_arrow", mpcd_steering_modes["EHSD_STR_WOS"]}}
Add_MPCD_VIDEO_Element(fp_wos_crs_arrow_bg)

local	fp_wos_crs_line					= CreateElement "ceSimpleLineObject"
		fp_wos_crs_line.name			= "fp_wos_crs_line"
		fp_wos_crs_line.material   		= mpcd_ehsd_lines_fg
		fp_wos_crs_line.width       	= 0.005
		fp_wos_crs_line.init_pos		= {0, 0, 0}
		fp_wos_crs_line.parent_element	= fp_wpt_os_symbol.name
		fp_wos_crs_line.controllers		= {{"nav_wpt_crs_line", mpcd_steering_modes["EHSD_STR_WOS"]}}
Add_MPCD_VIDEO_Element(fp_wos_crs_line)

local	fp_wos_crs_arrow				= CreateElement "ceSimpleLineObject"
		fp_wos_crs_arrow.name			= "fp_wos_crs_arrow"
		fp_wos_crs_arrow.material   	= mpcd_ehsd_lines_fg
		fp_wos_crs_arrow.width       	= 0.005
		fp_wos_crs_arrow.init_pos		= {0, 0, 0}
		fp_wos_crs_arrow.parent_element	= fp_wpt_os_symbol.name
		fp_wos_crs_arrow.controllers    = {{"nav_crs_arrow", mpcd_steering_modes["EHSD_STR_WOS"]}}
Add_MPCD_VIDEO_Element(fp_wos_crs_arrow)

-- AWLS steering
local	fp_awls_symbol					= create_mpcd_textured_box( 108, 886, 153, 932)
		fp_awls_symbol.name				= "fp_awls_symbol"
		fp_awls_symbol.init_pos			= {0, 0, 0}
		fp_awls_symbol.parent_element	= MPCD_center.name
		fp_awls_symbol.controllers		= {{"EHSD_AWLS_Steering"}, {"nav_awls_pos", EHSD_Scale}}
Add_MPCD_VIDEO_Element(fp_awls_symbol)

local	fp_awls_crs_line_bg					= CreateElement "ceSimpleLineObject"
		fp_awls_crs_line_bg.name			= "fp_awls_crs_line_bg"
		fp_awls_crs_line_bg.material		= mpcd_ehsd_lines_bg
		fp_awls_crs_line_bg.width       	= 0.007
		fp_awls_crs_line_bg.init_pos		= {0, 0, 0}
		fp_awls_crs_line_bg.parent_element	= fp_awls_symbol.name
		fp_awls_crs_line_bg.controllers		= {{"nav_wpt_crs_line", mpcd_steering_modes["EHSD_STR_AWLS"]}}
Add_MPCD_VIDEO_Element(fp_awls_crs_line_bg)


local	fp_awls_crs_arrow_bg				= CreateElement "ceSimpleLineObject"
		fp_awls_crs_arrow_bg.name			= "fp_awls_crs_arrow_bg"
		fp_awls_crs_arrow_bg.material   	= mpcd_ehsd_lines_bg
		fp_awls_crs_arrow_bg.width       	= 0.007
		fp_awls_crs_arrow_bg.init_pos		= {0, 0, 0}
		fp_awls_crs_arrow_bg.parent_element	= fp_awls_symbol.name
		fp_awls_crs_arrow_bg.controllers    = {{"nav_crs_arrow", mpcd_steering_modes["EHSD_STR_AWLS"]}}
Add_MPCD_VIDEO_Element(fp_awls_crs_arrow_bg)


local	fp_awls_crs_line				= CreateElement "ceSimpleLineObject"
		fp_awls_crs_line.name			= "fp_awls_crs_line"
		fp_awls_crs_line.material   	= mpcd_ehsd_lines_fg
		fp_awls_crs_line.width       	= 0.005
		fp_awls_crs_line.init_pos		= {0, 0, 0}
		fp_awls_crs_line.parent_element	= fp_awls_symbol.name
		fp_awls_crs_line.controllers	= {{"nav_wpt_crs_line", mpcd_steering_modes["EHSD_STR_AWLS"]}}
Add_MPCD_VIDEO_Element(fp_awls_crs_line)


local	fp_awls_crs_arrow					= CreateElement "ceSimpleLineObject"
		fp_awls_crs_arrow.name				= "fp_awls_crs_arrow"
		fp_awls_crs_arrow.material   		= mpcd_ehsd_lines_fg
		fp_awls_crs_arrow.width       		= 0.005
		fp_awls_crs_arrow.init_pos			= {0, 0, 0}
		fp_awls_crs_arrow.parent_element	= fp_awls_symbol.name
		fp_awls_crs_arrow.controllers   	= {{"nav_crs_arrow", mpcd_steering_modes["EHSD_STR_AWLS"]}}
Add_MPCD_VIDEO_Element(fp_awls_crs_arrow)

-- SEQ SYMBOLS
for i = 1, 8 do
	j = i - 3
	
	if j ~= 0 then
		local	SEQ_wpt_symbol					= create_mpcd_textured_box( 46, 728, 88, 770)
				SEQ_wpt_symbol.name				= "SEQ_wpt_symbol_" .. string.format("%02d", i)
				SEQ_wpt_symbol.init_pos			= {0, 0, 0}
				SEQ_wpt_symbol.parent_element	= MPCD_center.name
				SEQ_wpt_symbol.controllers		= {{"EHSD_MAP_SEQ"}, {"nav_wpt_SEQ_pos", j, EHSD_Scale}}
		Add_MPCD_VIDEO_Element(SEQ_wpt_symbol)

		local	SQE_wpt_label					= CreateElement "ceStringPoly"
				SQE_wpt_label.name				= "SQE_wpt_label_" .. string.format("%02d", i)
				SQE_wpt_label.material			= mpcd_tpod_font
				SQE_wpt_label.init_pos			= { 0.0, -0.08, 0}
				SQE_wpt_label.alignment			= "CenterCenter"
				SQE_wpt_label.formats			= {"%s"}
				SQE_wpt_label.stringdefs		= MPCD_default_font_size
				SQE_wpt_label.parent_element	= "SEQ_wpt_symbol_" .. string.format("%02d", i)
				SQE_wpt_label.controllers		= {{"nav_wpt_SEQ_lbl", j}}
		Add_MPCD_VIDEO_Element(SQE_wpt_label)

	end
end

-- COURSE LINE TICKS
for i = 1,10 do --Max tick marks in any mode
	local 	fp_wpt_crs_line_tick_bg				= CreateElement "ceSimpleLineObject"
			fp_wpt_crs_line_tick_bg.name			= "fp_wpt_crs_line_tick_bg_" .. string.format("%02d", i)
			fp_wpt_crs_line_tick_bg.material 		= mpcd_ehsd_lines_bg
			fp_wpt_crs_line_tick_bg.width			= 0.007
			fp_wpt_crs_line_tick_bg.init_pos 		= {0, 0, 0}
			fp_wpt_crs_line_tick_bg.parent_element = fp_wpt_symbol.name;
			fp_wpt_crs_line_tick_bg.controllers 	= {{"nav_crs_tick", mpcd_steering_modes["EHSD_STR_WPT"], i}}
	Add_MPCD_VIDEO_Element(fp_wpt_crs_line_tick_bg)
	
	local 	fp_wpt_crs_line_tick				= CreateElement "ceSimpleLineObject"
			fp_wpt_crs_line_tick.name			= "fp_wpt_crs_line_tick_" .. string.format("%02d", i)
			fp_wpt_crs_line_tick.material 		= mpcd_ehsd_lines_fg
			fp_wpt_crs_line_tick.width			= 0.005
			fp_wpt_crs_line_tick.init_pos 		= {0, 0, 0}
			fp_wpt_crs_line_tick.parent_element = fp_wpt_symbol.name;
			fp_wpt_crs_line_tick.controllers 	= {{"nav_crs_tick", mpcd_steering_modes["EHSD_STR_WPT"], i}}
	Add_MPCD_VIDEO_Element(fp_wpt_crs_line_tick)
	
	local 	fp_wos_crs_line_tick_bg				= CreateElement "ceSimpleLineObject"
			fp_wos_crs_line_tick_bg.name			= "fp_wos_crs_line_tick_bg_" .. string.format("%02d", i)
			fp_wos_crs_line_tick_bg.material 		= mpcd_ehsd_lines_bg
			fp_wos_crs_line_tick_bg.width			= 0.007
			fp_wos_crs_line_tick_bg.init_pos 		= {0, 0, 0}
			fp_wos_crs_line_tick_bg.parent_element = fp_wpt_os_symbol.name;
			fp_wos_crs_line_tick_bg.controllers 	= {{"nav_crs_tick", mpcd_steering_modes["EHSD_STR_WOS"], i}}
	Add_MPCD_VIDEO_Element(fp_wos_crs_line_tick_bg)
	
	local 	fp_wos_crs_line_tick				= CreateElement "ceSimpleLineObject"
			fp_wos_crs_line_tick.name			= "fp_wos_crs_line_tick_" .. string.format("%02d", i)
			fp_wos_crs_line_tick.material 		= mpcd_ehsd_lines_fg
			fp_wos_crs_line_tick.width			= 0.005
			fp_wos_crs_line_tick.init_pos 		= {0, 0, 0}
			fp_wos_crs_line_tick.parent_element = fp_wpt_os_symbol.name;
			fp_wos_crs_line_tick.controllers 	= {{"nav_crs_tick", mpcd_steering_modes["EHSD_STR_WOS"], i}}
	Add_MPCD_VIDEO_Element(fp_wos_crs_line_tick)
	
	local 	fp_awls_crs_line_tick_bg				= CreateElement "ceSimpleLineObject"
			fp_awls_crs_line_tick_bg.name			= "fp_awls_crs_line_tick_bg_" .. string.format("%02d", i)
			fp_awls_crs_line_tick_bg.material 		= mpcd_ehsd_lines_bg
			fp_awls_crs_line_tick_bg.width			= 0.007
			fp_awls_crs_line_tick_bg.init_pos 		= {0, 0, 0}
			fp_awls_crs_line_tick_bg.parent_element = fp_awls_symbol.name;
			fp_awls_crs_line_tick_bg.controllers 	= {{"nav_crs_tick", mpcd_steering_modes["EHSD_STR_AWLS"], i}}
	Add_MPCD_VIDEO_Element(fp_awls_crs_line_tick_bg)
	
	local 	fp_awls_crs_line_tick				= CreateElement "ceSimpleLineObject"
			fp_awls_crs_line_tick.name			= "fp_awls_crs_line_tick_" .. string.format("%02d", i)
			fp_awls_crs_line_tick.material 		= mpcd_ehsd_lines_fg
			fp_awls_crs_line_tick.width			= 0.005
			fp_awls_crs_line_tick.init_pos 		= {0, 0, 0}
			fp_awls_crs_line_tick.parent_element = fp_awls_symbol.name;
			fp_awls_crs_line_tick.controllers 	= {{"nav_crs_tick", mpcd_steering_modes["EHSD_STR_AWLS"], i}}
	Add_MPCD_VIDEO_Element(fp_awls_crs_line_tick)
end

-- TARGET SYMBOLS
local	dsg_strpt_symbol						= create_mpcd_textured_box( 173, 800, 223, 850)
		dsg_strpt_symbol.name					= "dsg_strpt_symbol"
		dsg_strpt_symbol.init_pos				= {0, 0, 0}
		dsg_strpt_symbol.parent_element			= MPCD_center.name
		dsg_strpt_symbol.controllers			= {{"ccrp_target_pos", EHSD_Scale}}
Add_MPCD_VIDEO_Element(dsg_strpt_symbol)

local	dsg_strpt_crs_line_bg					= CreateElement "ceSimpleLineObject"
		dsg_strpt_crs_line_bg.name				= "dsg_strpt_crs_line_bg"
		dsg_strpt_crs_line_bg.material   		= mpcd_ehsd_lines_bg
		dsg_strpt_crs_line_bg.width       		= 0.007
		dsg_strpt_crs_line_bg.init_pos			= {0, 0, 0}
		dsg_strpt_crs_line_bg.parent_element	= dsg_strpt_symbol.name
		dsg_strpt_crs_line_bg.controllers		= {{"nav_wpt_crs_line", mpcd_steering_modes["EHSD_STR_WPT"]}}
Add_MPCD_VIDEO_Element(dsg_strpt_crs_line_bg)

local	dsg_strpt_crs_arrow_bg					= CreateElement "ceSimpleLineObject"
		dsg_strpt_crs_arrow_bg.name				= "dsg_strpt_crs_arrow_bg"
		dsg_strpt_crs_arrow_bg.material			= mpcd_ehsd_lines_bg
		dsg_strpt_crs_arrow_bg.width       		= 0.007
		dsg_strpt_crs_arrow_bg.init_pos			= {0, 0, 0}
		dsg_strpt_crs_arrow_bg.parent_element	= dsg_strpt_symbol.name
		dsg_strpt_crs_arrow_bg.controllers		= {{"nav_crs_arrow", mpcd_steering_modes["EHSD_STR_WPT"]}}
Add_MPCD_VIDEO_Element(dsg_strpt_crs_arrow_bg)

local	dsg_strpt_crs_line						= CreateElement "ceSimpleLineObject"
		dsg_strpt_crs_line.name					= "dsg_strpt_crs_line"
		dsg_strpt_crs_line.material   			= mpcd_ehsd_lines_fg
		dsg_strpt_crs_line.width       			= 0.005
		dsg_strpt_crs_line.init_pos				= {0, 0, 0}
		dsg_strpt_crs_line.parent_element		= dsg_strpt_symbol.name
		dsg_strpt_crs_line.controllers			= {{"nav_wpt_crs_line", mpcd_steering_modes["EHSD_STR_WPT"]}}
Add_MPCD_VIDEO_Element(dsg_strpt_crs_line)

local	dsg_strpt_crs_arrow						= CreateElement "ceSimpleLineObject"
		dsg_strpt_crs_arrow.name				= "dsg_strpt_crs_arrow"
		dsg_strpt_crs_arrow.material			= mpcd_ehsd_lines_fg
		dsg_strpt_crs_arrow.width       		= 0.005
		dsg_strpt_crs_arrow.init_pos			= {0, 0, 0}
		dsg_strpt_crs_arrow.parent_element		= dsg_strpt_symbol.name
		dsg_strpt_crs_arrow.controllers			= {{"nav_crs_arrow", mpcd_steering_modes["EHSD_STR_WPT"]}}
Add_MPCD_VIDEO_Element(dsg_strpt_crs_arrow)
