dofile(LockOn_Options.script_path.."HUD\\HUD_definitions.lua")

txt_launch_permission					= create_HUD_element("ceStringPoly")
txt_launch_permission.name				= "txt_launch_permission"
txt_launch_permission.material    = "font_Ka-50_HUD"
txt_launch_permission.init_pos			= {-0.643, TA_text_pos_y + interline + vertical_displacement, 0}
txt_launch_permission.alignment			= "LeftCenter"
txt_launch_permission.value				= LOCALIZE("С")
txt_launch_permission.stringdefs		= default_font_stringdefs
txt_launch_permission.controllers       = {{"launch_permission"}}
AddWithDefaultClip(txt_launch_permission)

txt_training_mode					= create_HUD_element("ceStringPoly")
txt_training_mode.name				= "txt_training_mode"txt_training_mode.material    = "font_Ka-50_HUD"
txt_training_mode.init_pos			= {-0.63, 0.25 + vertical_displacement + txtVertShift_Fix, 0}
txt_training_mode.alignment			= "CenterTop"
txt_training_mode.value				= LOCALIZE("ТРЕНАЖ")
txt_training_mode.stringdefs		= default_font_stringdefs
txt_training_mode.controllers		= {{"TrainingModeSymbAvail"}}
AddWithDefaultClip(txt_training_mode)

local size_break_cross          = 99 / 1024

break_symbol					= create_HUD_element("ceTexPoly")
break_symbol.name				= "break_symbol"
break_symbol.vertices			= {{-size_break_cross/tex_scale, -size_break_cross/tex_scale}, 
							       {-size_break_cross/tex_scale,  size_break_cross/tex_scale},
							       { size_break_cross/tex_scale,  size_break_cross/tex_scale},
							       { size_break_cross/tex_scale, -size_break_cross/tex_scale}}
break_symbol.indices			= default_box_indices
break_symbol.init_pos			= {0,0.87 - 0.27  + vertical_displacement, 0}
break_symbol.material			= "INDICATION_HUD_KA50"
break_symbol.tex_params		    = getTexParams(918, 460)
break_symbol.controllers	    = {{"hud_cross"}}
AddWithDefaultClip(break_symbol)

-- Ka-50 3 specific symbology
if modification_prop == "Ka-50_3" then
	-- weapon type
	txt_weapon_type_and_count					= create_HUD_element("ceStringPoly")
	txt_weapon_type_and_count.name				= "txt_weapon_type_and_count"
	txt_weapon_type_and_count.material			= "font_Ka-50_HUD"
	txt_weapon_type_and_count.init_pos			= {0.0, -0.5 + vertical_displacement}
	txt_weapon_type_and_count.alignment			= "CenterCenter"
	txt_weapon_type_and_count.stringdefs		= default_font_stringdefs
	txt_weapon_type_and_count.formats         	= {"%s %d"}
	txt_weapon_type_and_count.controllers		= {{"scales_reject"}, {"weaponTypeAndCount"}}
	AddWithDefaultClip(txt_weapon_type_and_count)

	do
		local stations_placeholder 				= addPlaceholder("stations_placeholder", {0, -0.61 + vertical_displacement}, {{"scales_reject"}, {"displayStations"}})
		
		local stationHalfSzX			= 0.05
		local stationHalfSzY			= 0.02
			
		local stationShiftX				= 0.25
		local stationSpacing			= 0.13
		
		local stationSelectedHalfSz		= 0.05
			
		local stationSelectedShiftY		= 0.05
		
		for i = 1, 3 do
			
			local stationLeft					= create_HUD_element("ceTexPoly")
			stationLeft.name					= "station_left_" .. i
			stationLeft.vertices				= {{-stationHalfSzX, -stationHalfSzY}, 
												   {-stationHalfSzX, stationHalfSzY},
												   {stationHalfSzX, stationHalfSzY},
												   {stationHalfSzX, -stationHalfSzY}}
			stationLeft.indices					= default_box_indices
			stationLeft.material				= "INDICATION_HUD_KA50"
			stationLeft.tex_params				= getTexParams(807, 121.5)
			stationLeft.parent_element			= stations_placeholder.name
			stationLeft.init_pos				= {-(stationShiftX + (3 - i) * stationSpacing), -stationSelectedShiftY}
			stationLeft.controllers				= {{"stationStatus", i - 1, 0}}
			AddWithDefaultClip(stationLeft)
			
			local stationRight 					= Copy(stationLeft)
			stationRight.name 					= "station_right_" .. i
			stationRight.init_pos				= {stationShiftX + (i - 1) * stationSpacing, -stationSelectedShiftY}
			stationRight.controllers			= {{"stationStatus", i + 3 - 1, 0}}
			AddWithDefaultClip(stationRight)
			
			local stationSelectedLeft			= create_HUD_element("ceTexPoly")
			stationSelectedLeft.name			= "station_selected_left_" .. i
			stationSelectedLeft.vertices		= {{-stationSelectedShiftY, -stationSelectedShiftY}, 
												   {-stationSelectedShiftY, stationSelectedShiftY},
												   {stationSelectedShiftY, stationSelectedShiftY},
												   {stationSelectedShiftY, -stationSelectedShiftY}}
			stationSelectedLeft.indices			= default_box_indices
			stationSelectedLeft.material		= "INDICATION_HUD_KA50"
			stationSelectedLeft.tex_params		= getTexParams(824, 246)
			stationSelectedLeft.parent_element	= stationLeft.name
			stationSelectedLeft.init_pos		= {0, stationSelectedShiftY}
			stationSelectedLeft.controllers		= {{"stationStatus", i - 1, 1}}
			AddWithDefaultClip(stationSelectedLeft)
						
			local stationSelectedRight			= Copy(stationSelectedLeft)
			stationSelectedRight.name			= "station_selected_right_" .. i
			stationSelectedRight.parent_element	= stationRight.name
			stationSelectedRight.controllers	= {{"stationStatus", i + 3 - 1, 1}}
			AddWithDefaultClip(stationSelectedRight)
		end
	end
end
