dofile(LockOn_Options.script_path.."HUD\\HUD_definitions.lua")
--[[
grid            = CreateElement "ceTexPoly"
grid.name       = "grid"
grid.vertices   = {{-0.54, -0.837}, {-0.54, 0.295}, {0.54, 0.295}, {0.54, -0.837}}
grid.indices    = default_box_indices
grid.material   = "INDICATION_HUD_KA50"
grid.tex_params = {0.52658, 0.22868, tex_scale, tex_scale}
Add(grid)
--]]

SetCustomScale(1.0)
function AddElement(object)
	object.screenspace = ScreenType.SCREENSPACE_TRUE
    object.use_mipfilter = true
    Add(object)
end

scale_padlock        = 1

local k_padlock_size = 0.05

local x     = 16/128 
local y     = 49/128
local x_min = 1/128  - x
local x_max = 50/128 - x
local y_max = y - 2/128
local y_min = y - 64/128

ring             = CreateElement "ceTexPoly"
ring.name        = "ring"
ring.vertices    = {{x_min * k_padlock_size,y_min * k_padlock_size},
				    {x_min * k_padlock_size,y_max * k_padlock_size},
				    {x_max * k_padlock_size,y_max * k_padlock_size},
				    {x_max * k_padlock_size,y_min * k_padlock_size}}
ring.indices     =  default_box_indices
ring.material    = "INDICATION_PADLOCK_KA50"
ring.tex_params  = {x,y,scale_padlock / k_padlock_size ,scale_padlock / k_padlock_size}
ring.controllers = {{"padlock_mode",1,2},{"padlock_point"}}
ring.additive_alpha = true
AddElement(ring)
