dofile(LockOn_Options.script_path.."MPCD/indicator/MPCD_definitions.lua")
dofile(LockOn_Options.script_path.."MPCD/indicator/MENU/MPCD_BG.lua")

--Alignment Structure
--local mpcd_align	= create_mpcd_textured_box( 0, 0, 1024, 1024, nil, nil, 0)
--mpcd_align.name		= "mpcd_align"
--mpcd_align.init_pos	= {0, 0, 0}
--Add_MPCD_Element(mpcd_align)

-- Menu Options
local mpcd_mm_btn_03			= CreateElement "ceStringPoly"
mpcd_mm_btn_03.name				= "mpcd_mm_btn_03"
mpcd_mm_btn_03.material			= mpcd_font_base
mpcd_mm_btn_03.init_pos			= mpcd_btn_03_pos
mpcd_mm_btn_03.alignment		= "CenterCenter"
mpcd_mm_btn_03.value			= "P\nH\nO\nV"
mpcd_mm_btn_03.stringdefs		= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_03)

local mpcd_mm_btn_05			= CreateElement "ceStringPoly"
mpcd_mm_btn_05.name				= "mpcd_mm_btn_05"
mpcd_mm_btn_05.material			= mpcd_font_base
mpcd_mm_btn_05.init_pos			= mpcd_btn_05_pos
mpcd_mm_btn_05.alignment		= "CenterCenter"
mpcd_mm_btn_05.value			= "E\nM\nS"
mpcd_mm_btn_05.stringdefs		= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_05)

local mpcd_mm_btn_10			= CreateElement "ceStringPoly"
mpcd_mm_btn_10.name				= "mpcd_mm_btn_10"
mpcd_mm_btn_10.material			= mpcd_font_base
mpcd_mm_btn_10.init_pos			= mpcd_btn_10_pos
mpcd_mm_btn_10.alignment		= "CenterCenter"
mpcd_mm_btn_10.value			= "JPT"
mpcd_mm_btn_10.stringdefs		= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_10)

local mpcd_mm_btn_16			= CreateElement "ceStringPoly"
mpcd_mm_btn_16.name				= "mpcd_mm_btn_16"
mpcd_mm_btn_16.material			= mpcd_font_base
mpcd_mm_btn_16.init_pos			= mpcd_btn_16_pos
mpcd_mm_btn_16.alignment		= "CenterCenter"
mpcd_mm_btn_16.value			= "ACCEL"
mpcd_mm_btn_16.stringdefs		= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_16)

local mpcd_mm_btn_18			= CreateElement "ceStringPoly"
mpcd_mm_btn_18.name				= "mpcd_mm_btn_18"
mpcd_mm_btn_18.material			= mpcd_font_base
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_font_base
mpcd_mm_btn_20.init_pos			= mpcd_btn_20_pos
mpcd_mm_btn_20.alignment		= "CenterCenter"
mpcd_mm_btn_20.value			= "FRZ"
mpcd_mm_btn_20.stringdefs		= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_20)


-- DATA LABELS
local	eng_id					= CreateElement "ceStringPoly"
		eng_id.name				= "eng_id"
		eng_id.material			= mpcd_font_base
		eng_id.init_pos			= {0.0, 0.82, 0}
		eng_id.alignment		= "CenterCenter"
		eng_id.value			= "ENG ID(3)-408"
		eng_id.stringdefs		= MPCD_data1_font_size
		Add_MPCD_Element(eng_id)
		
local	sortie_JPT		= CreateElement "ceStringPoly"
		sortie_JPT.name			= "sortie_JPT"
		sortie_JPT.material		= mpcd_font_base
		sortie_JPT.init_pos		= {0.60, 0.62, 0}
		sortie_JPT.alignment	= "RightCenter"
		sortie_JPT.value		= "SORTIE JPT"
		sortie_JPT.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(sortie_JPT)
		
local	eng_life_count				= CreateElement "ceStringPoly"
		eng_life_count.name			= "eng_life_count"
		eng_life_count.material		= mpcd_font_base
		eng_life_count.init_pos		= {-0.80, 0.55, 0}
		eng_life_count.alignment	= "LeftCenter"
		eng_life_count.formats		= {"LIFE %d"}
		eng_life_count.stringdefs	= MPCD_data1_font_size
		eng_life_count.controllers	= {{"eng_life_count"}}
		Add_MPCD_Element(eng_life_count)

local	eng_max_jpt				= CreateElement "ceStringPoly"
		eng_max_jpt.name		= "eng_max_jpt"
		eng_max_jpt.material	= mpcd_font_base
		eng_max_jpt.init_pos	= {0.60, 0.55, 0}
		eng_max_jpt.alignment	= "RightCenter"
		eng_max_jpt.value		= "MAX JPT"
		eng_max_jpt.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(eng_max_jpt)

local	eng_ot_time				= CreateElement "ceStringPoly"
		eng_ot_time.name		= "eng_ot_time"
		eng_ot_time.material	= mpcd_font_base
		eng_ot_time.init_pos	= {0.60, 0.48, 0}
		eng_ot_time.alignment	= "RightCenter"
		eng_ot_time.value		= "OT TIME"
		eng_ot_time.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(eng_ot_time)

local	eng_ot_time_l2				= CreateElement "ceStringPoly"
		eng_ot_time_l2.name			= "eng_ot_time_l2"
		eng_ot_time_l2.material		= mpcd_font_base
		eng_ot_time_l2.init_pos		= {0.84, 0.48, 0}
		eng_ot_time_l2.alignment	= "LeftCenter"
		eng_ot_time_l2.value		= "SEC"
		eng_ot_time_l2.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(eng_ot_time_l2)
		
local	stab_pos				= CreateElement "ceStringPoly"
		stab_pos.name			= "stab_pos"
		stab_pos.material		= mpcd_font_base
		stab_pos.init_pos		= {-0.10, 0.34, 0}
		stab_pos.alignment		= "LeftCenter"
		stab_pos.value			= "STAB POS"
		stab_pos.stringdefs		= MPCD_data1_font_size
		Add_MPCD_Element(stab_pos)

local	igv_label				= CreateElement "ceStringPoly"
		igv_label.name			= "igv_label"
		igv_label.material		= mpcd_font_base
		igv_label.init_pos		= {-0.10, 0.20, 0}
		igv_label.alignment		= "LeftCenter"
		igv_label.value			= "IGV"
		igv_label.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(igv_label)

local	hov_label				= CreateElement "ceStringPoly"
		hov_label.name			= "hov_label"
		hov_label.material		= mpcd_font_base
		hov_label.init_pos		= {0.75, 0.20, 0}
		hov_label.alignment		= "LeftCenter"
		hov_label.formats		= {"HOV %d"}
		hov_label.stringdefs	= MPCD_data1_font_size
		hov_label.controllers	= {{"phover_idx"}}
		Add_MPCD_Element(hov_label)

local	eng_comp_rpm			= CreateElement "ceStringPoly"
		eng_comp_rpm.name		= "eng_comp_rpm"
		eng_comp_rpm.material	= mpcd_font_base
		eng_comp_rpm.init_pos	= {-0.10, 0.13, 0}
		eng_comp_rpm.alignment	= "LeftCenter"
		eng_comp_rpm.value		= "COMP RPM"
		eng_comp_rpm.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(eng_comp_rpm)

local	eng_fan_rpm				= CreateElement "ceStringPoly"
		eng_fan_rpm.name		= "eng_fan_rpm"
		eng_fan_rpm.material	= mpcd_font_base
		eng_fan_rpm.init_pos	= {-0.10, 0.06, 0}
		eng_fan_rpm.alignment	= "LeftCenter"
		eng_fan_rpm.value		= "FAN RPM"
		eng_fan_rpm.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(eng_fan_rpm)

local	eng_jpt_label				= CreateElement "ceStringPoly"
		eng_jpt_label.name			= "eng_jpt_label"
		eng_jpt_label.material		= mpcd_font_base
		eng_jpt_label.init_pos		= {-0.10, -0.01, 0}
		eng_jpt_label.alignment		= "LeftCenter"
		eng_jpt_label.value			= "JPT"
		eng_jpt_label.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(eng_jpt_label)

local	eng_cor_comp			= CreateElement "ceStringPoly"
		eng_cor_comp.name		= "eng_cor_comp"
		eng_cor_comp.material	= mpcd_font_base
		eng_cor_comp.init_pos	= {-0.10, -0.08, 0}
		eng_cor_comp.alignment	= "LeftCenter"
		eng_cor_comp.value		= "COR COMP"
		eng_cor_comp.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(eng_cor_comp)

local	eng_cor_fan				= CreateElement "ceStringPoly"
		eng_cor_fan.name		= "eng_cor_fan"
		eng_cor_fan.material	= mpcd_font_base
		eng_cor_fan.init_pos	= {-0.10, -0.15, 0}
		eng_cor_fan.alignment	= "LeftCenter"
		eng_cor_fan.value		= "COR FAN"
		eng_cor_fan.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(eng_cor_fan)

local	fuel_weight				= CreateElement "ceStringPoly"
		fuel_weight.name		= "fuel_weight"
		fuel_weight.material	= mpcd_font_base
		fuel_weight.init_pos	= {-0.10, -0.22, 0}
		fuel_weight.alignment	= "LeftCenter"
		fuel_weight.value		= "FUEL WT"
		fuel_weight.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(fuel_weight)

local	acc_label				= CreateElement "ceStringPoly"
		acc_label.name			= "acc_label"
		acc_label.material		= mpcd_font_base
		acc_label.init_pos		= {0, -0.36, 0}
		acc_label.alignment		= "CenterCenter"
		acc_label.value			= "ACCELERATION"
		acc_label.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(acc_label)

local	acc_rpm_l1				= CreateElement "ceStringPoly"
		acc_rpm_l1.name			= "acc_rpm_l1"
		acc_rpm_l1.material		= mpcd_font_base
		acc_rpm_l1.init_pos		= {-0.55, -0.43, 0}
		acc_rpm_l1.alignment	= "RightCenter"
		acc_rpm_l1.value		= "RPM"
		acc_rpm_l1.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(acc_rpm_l1)

local	acc_rpm_l2				= CreateElement "ceStringPoly"
		acc_rpm_l2.name			= "acc_rpm_l2"
		acc_rpm_l2.material		= mpcd_font_base
		acc_rpm_l2.init_pos		= {-0.20, -0.43, 0}
		acc_rpm_l2.alignment	= "CenterCenter"
		acc_rpm_l2.value		= "35-60%"
		acc_rpm_l2.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(acc_rpm_l2)

local	acc_rpm_l3				= CreateElement "ceStringPoly"
		acc_rpm_l3.name			= "acc_rpm_l3"
		acc_rpm_l3.material		= mpcd_font_base
		acc_rpm_l3.init_pos		= {0.20, -0.43, 0}
		acc_rpm_l3.alignment	= "CenterCenter"
		acc_rpm_l3.value		= "60-105%"
		acc_rpm_l3.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(acc_rpm_l3)

local	acc_time_l				= CreateElement "ceStringPoly"
		acc_time_l.name			= "acc_time_l"
		acc_time_l.material		= mpcd_font_base
		acc_time_l.init_pos		= {-0.55, -0.50, 0}
		acc_time_l.alignment	= "RightCenter"
		acc_time_l.value		= "TIME"
		acc_time_l.stringdefs	= MPCD_data1_font_size
		Add_MPCD_Element(acc_time_l)

-- DATA
local	sortie_JPT_data				= CreateElement "ceStringPoly"
		sortie_JPT_data.name		= "sortie_JPT"
		sortie_JPT_data.material	= mpcd_font_base
		sortie_JPT_data.init_pos	= {0.90, 0.62, 0}
		sortie_JPT_data.alignment	= "RightCenter"
		sortie_JPT_data.formats		= {"%1.f;C"}
		sortie_JPT_data.stringdefs	= MPCD_data1_font_size
		sortie_JPT_data.controllers	= {{"eng_sortie_JPT"}}
		Add_MPCD_Element(sortie_JPT_data)

local	eng_max_jpt_v				= CreateElement "ceStringPoly"
		eng_max_jpt_v.name			= "eng_max_jpt_v"
		eng_max_jpt_v.material		= mpcd_font_base
		eng_max_jpt_v.init_pos		= {0.90, 0.55, 0}
		eng_max_jpt_v.alignment		= "RightCenter"
		eng_max_jpt_v.formats		= {"%1.f;C"}
		eng_max_jpt_v.stringdefs	= MPCD_data1_font_size
		eng_max_jpt_v.controllers	= {{"eng_max_jpt_val"}}
		Add_MPCD_Element(eng_max_jpt_v)

local	eng_ot_time_v				= CreateElement "ceStringPoly"
		eng_ot_time_v.name			= "eng_ot_time_v"
		eng_ot_time_v.material		= mpcd_font_base
		eng_ot_time_v.init_pos		= {0.80, 0.48, 0}
		eng_ot_time_v.alignment		= "RightCenter"
		eng_ot_time_v.formats		= {"%1.f"}
		eng_ot_time_v.stringdefs	= MPCD_data1_font_size
		eng_ot_time_v.controllers	= {{"eng_otemp_time"}}
		Add_MPCD_Element(eng_ot_time_v)

local	stab_pos_v					= CreateElement "ceStringPoly"
		stab_pos_v.name				= "stab_pos_v"
		stab_pos_v.material			= mpcd_font_base
		stab_pos_v.init_pos			= {0.60, 0.34, 0}
		stab_pos_v.alignment		= "RightCenter"
		stab_pos_v.formats			= {"%1.1f;"}
		stab_pos_v.stringdefs		= MPCD_data1_font_size
		stab_pos_v.controllers		= {{"eng_stab_pos"}}
		Add_MPCD_Element(stab_pos_v)

local	igv_v					= CreateElement "ceStringPoly"
		igv_v.name				= "eng_igv_value"
		igv_v.material			= mpcd_font_base
		igv_v.init_pos			= {0.60, 0.20, 0}
		igv_v.alignment			= "RightCenter"
		igv_v.formats			= {"%1.f;"}
		igv_v.stringdefs		= MPCD_data1_font_size
		igv_v.controllers		= {{"eng_igv_value"}}
		Add_MPCD_Element(igv_v)

local	stab_pos_symbol				= create_mpcd_textured_box( 180, 864, 198, 922, nil, nil, 1)
		stab_pos_symbol.name		= "stab_pos_symbol"
		stab_pos_symbol.init_pos	= {0.64, 0.34, 0}
		stab_pos_symbol.controllers	= {{"eng_stab_pos_vector"}}
		Add_MPCD_Element(stab_pos_symbol)

local	eng_comp_rpm_v				= CreateElement "ceStringPoly"
		eng_comp_rpm_v.name			= "eng_comp_rpm_v"
		eng_comp_rpm_v.material		= mpcd_font_base
		eng_comp_rpm_v.init_pos		= {0.60, 0.13, 0}
		eng_comp_rpm_v.alignment	= "RightCenter"
		eng_comp_rpm_v.formats		= {"%1.f%%"}
		eng_comp_rpm_v.stringdefs	= MPCD_data1_font_size
		eng_comp_rpm_v.controllers	= {{"eng_comp_rpm_u"}}
		Add_MPCD_Element(eng_comp_rpm_v)
		
local	eng_fan_rpm_v				= CreateElement "ceStringPoly"
		eng_fan_rpm_v.name			= "eng_fan_rpm_v"
		eng_fan_rpm_v.material		= mpcd_font_base
		eng_fan_rpm_v.init_pos		= {0.60, 0.06, 0}
		eng_fan_rpm_v.alignment		= "RightCenter"
		eng_fan_rpm_v.formats		= {"%1.f%%"}
		eng_fan_rpm_v.stringdefs	= MPCD_data1_font_size
		eng_fan_rpm_v.controllers	= {{"eng_fan_rpm_u"}}
		Add_MPCD_Element(eng_fan_rpm_v)

local	eng_jpt_label_v				= CreateElement "ceStringPoly"
		eng_jpt_label_v.name		= "eng_jpt_label_v"
		eng_jpt_label_v.material	= mpcd_font_base
		eng_jpt_label_v.init_pos	= {0.65, -0.01, 0}
		eng_jpt_label_v.alignment	= "RightCenter"
		eng_jpt_label_v.formats		= {"%1.f;C"}
		eng_jpt_label_v.stringdefs	= MPCD_data1_font_size
		eng_jpt_label_v.controllers	= {{"eng_jpt_value"}}
		Add_MPCD_Element(eng_jpt_label_v)

local	eng_cor_comp_v				= CreateElement "ceStringPoly"
		eng_cor_comp_v.name			= "eng_cor_comp_v"
		eng_cor_comp_v.material		= mpcd_font_base
		eng_cor_comp_v.init_pos		= {0.60, -0.08, 0}
		eng_cor_comp_v.alignment	= "RightCenter"
		eng_cor_comp_v.formats		= {"%1.f%%"}
		eng_cor_comp_v.stringdefs	= MPCD_data1_font_size
		eng_cor_comp_v.controllers	= {{"eng_comp_rpm_c"}}
		Add_MPCD_Element(eng_cor_comp_v)

local	eng_cor_fan_v				= CreateElement "ceStringPoly"
		eng_cor_fan_v.name			= "eng_cor_fan_v"
		eng_cor_fan_v.material		= mpcd_font_base
		eng_cor_fan_v.init_pos		= {0.60, -0.15, 0}
		eng_cor_fan_v.alignment		= "RightCenter"
		eng_cor_fan_v.formats		= {"%1.f%%"}
		eng_cor_fan_v.stringdefs	= MPCD_data1_font_size
		eng_cor_fan_v.controllers	= {{"eng_fan_rpm_c"}}
		Add_MPCD_Element(eng_cor_fan_v)

local	fuel_weight_v				= CreateElement "ceStringPoly"
		fuel_weight_v.name			= "fuel_weight_v"
		fuel_weight_v.material		= mpcd_font_base
		fuel_weight_v.init_pos		= {0.58, -0.22, 0}
		fuel_weight_v.alignment		= "RightCenter"
		fuel_weight_v.formats		= {"%1.f"}
		fuel_weight_v.stringdefs	= MPCD_data1_font_size
		fuel_weight_v.controllers	= {{"ac_fuel_wt"}}
		Add_MPCD_Element(fuel_weight_v)

local	acc_time_v1				= CreateElement "ceStringPoly"
		acc_time_v1.name		= "acc_time_v1"
		acc_time_v1.material	= mpcd_font_base
		acc_time_v1.init_pos	= {-0.20, -0.50, 0}
		acc_time_v1.alignment	= "CenterCenter"
		acc_time_v1.formats		= {"%1.1fSEC"}
		acc_time_v1.stringdefs	= MPCD_data1_font_size
		acc_time_v1.controllers	= {{"accel_time_1"}}
		Add_MPCD_Element(acc_time_v1)

local	acc_time_v2				= CreateElement "ceStringPoly"
		acc_time_v2.name		= "acc_time_v2"
		acc_time_v2.material	= mpcd_font_base
		acc_time_v2.init_pos	= {0.20, -0.50, 0}
		acc_time_v2.alignment	= "CenterCenter"
		acc_time_v2.formats		= {"%1.1fSEC"}
		acc_time_v2.stringdefs	= MPCD_data1_font_size
		acc_time_v2.controllers	= {{"accel_time_2"}}
		Add_MPCD_Element(acc_time_v2)

local	eng_fan_rpm_h				= CreateElement "ceStringPoly"
		eng_fan_rpm_h.name			= "eng_fan_rpm_h"
		eng_fan_rpm_h.material		= mpcd_font_base
		eng_fan_rpm_h.init_pos		= {0.94, 0.06, 0}
		eng_fan_rpm_h.alignment		= "RightCenter"
		eng_fan_rpm_h.formats		= {"%1.f%%"}
		eng_fan_rpm_h.stringdefs	= MPCD_data1_font_size
		eng_fan_rpm_h.controllers	= {{"eng_fan_rpm_h"}}
		Add_MPCD_Element(eng_fan_rpm_h)

local	eng_jpt_label_h				= CreateElement "ceStringPoly"
		eng_jpt_label_h.name		= "eng_jpt_label_h"
		eng_jpt_label_h.material	= mpcd_font_base
		eng_jpt_label_h.init_pos	= {0.97, -0.01, 0}
		eng_jpt_label_h.alignment	= "RightCenter"
		eng_jpt_label_h.formats		= {"%1.f;C"}
		eng_jpt_label_h.stringdefs	= MPCD_data1_font_size
		eng_jpt_label_h.controllers	= {{"eng_jpt_val_h"}}
		Add_MPCD_Element(eng_jpt_label_h)

local	fuel_weight_h				= CreateElement "ceStringPoly"
		fuel_weight_h.name			= "fuel_weight_h"
		fuel_weight_h.material		= mpcd_font_base
		fuel_weight_h.init_pos		= {0.90, -0.22, 0}
		fuel_weight_h.alignment		= "RightCenter"
		fuel_weight_h.formats		= {"%1.f"}
		fuel_weight_h.stringdefs	= MPCD_data1_font_size
		fuel_weight_h.controllers	= {{"ac_fuel_wt_h"}}
		Add_MPCD_Element(fuel_weight_h)
		
-- SELECTION BOXES
local	mpcd_btn_16_boxed				= create_mpcd_textured_box( 60, 4, 175, 50)
		mpcd_btn_16_boxed.name			= "mpcd_btn_16_boxed"
		mpcd_btn_16_boxed.init_pos		= mpcd_btn_16_pos
		mpcd_btn_16_boxed.controllers	= {{"accel_mode_on"}}
Add_MPCD_Element(mpcd_btn_16_boxed)

