local my_path = LockOn_Options.script_path.."PCN/"
dofile(my_path.."PCN_definitions.lua")

local half_width   = GetScale()
local half_height  = GetAspect() * half_width

local aspect       = GetAspect() -- GetHalfHeight()/GetHalfWidth()

pcn_ur_base					= CreateElement "ceMeshPoly" -- untextured shape
pcn_ur_base.name			= "PCN_UR"
pcn_ur_base.material		= MakeMaterial(nil,{255,0,0,50})
pcn_ur_base.h_clip_relation	= h_clip_relations.REWRITE_LEVEL
pcn_ur_base.level			= PCN_DEFAULT_LEVEL
pcn_ur_base.collimated		= false
pcn_ur_base.isvisible		= false
pcn_ur_base.z_enable		= true
pcn_ur_base.vertices		= { {-1, aspect}, { 1,aspect}, { 1,-aspect}, {-1,-aspect}, }
pcn_ur_base.indices			=  {0,1,2 ;  0,2,3 }
Add(pcn_ur_base)



-- ** LEFT LCD ** --
add_layer("PCN_UL_SEG0",    {-0.20, 0.01},     "RightCenter",  "88888",    pcn_font_size_default,    {{"PCN_UL_SEG", 0}})
add_layer("PCN_UL_SEG1",    {-0.20, 0.01},     "RightCenter",  "88888",    pcn_font_size_default,    {{"PCN_UL_SEG", 1}})
add_layer("PCN_UL_SEG2",    {-0.20, 0.01},     "RightCenter",  "88888",    pcn_font_size_default,    {{"PCN_UL_SEG", 2}})
add_layer("PCN_UL_SEG3",    {-0.20, 0.01},     "RightCenter",  "88888",    pcn_font_size_default,    {{"PCN_UL_SEG", 3}})
add_layer("PCN_UL_SEG4",    {-0.20, 0.01},     "RightCenter",  "88888",    pcn_font_size_default,    {{"PCN_UL_SEG", 4}})
add_layer("PCN_UL_SEG5",    {-0.20, 0.01},     "RightCenter",  "88888",    pcn_font_size_default,    {{"PCN_UL_SEG", 5}})
add_layer("PCN_UL_SEG6",    {-0.20, 0.01},     "RightCenter",  "88888",    pcn_font_size_default,    {{"PCN_UL_SEG", 6}})
add_layer("PCN_UL_SEG7",    {-0.20, 0.01},     "RightCenter",  "pppp ",    pcn_font_size_default,    {{"PCN_UL_SEG", 7}})
add_layer("PCN_UL_N",       {-1.00, 0.06} ,    "LeftCenter",   "N",        pcn_font_size_modifiers,  {{"PCN_UL_N"}})
add_layer("PCN_UL_S",       {-1.00,-0.04},     "LeftCenter",   "S",        pcn_font_size_modifiers,  {{"PCN_UL_S"}})
add_layer("PCN_UL_P",       {-0.94, 0.06},     "LeftCenter",   "+",        pcn_font_size_modifiers,  {{"PCN_UL_P"}})
add_layer("PCN_UL_M",       {-0.94,-0.04},     "LeftCenter",   "-",        pcn_font_size_modifiers,  {{"PCN_UL_M"}})

-- ** RIGHT LCD ** --+
add_layer("PCN_UR_SEG0",    { 0.85, 0.01},     "RightCenter",  "888888",   pcn_font_size_default,    {{"PCN_UR_SEG", 0}})
add_layer("PCN_UR_SEG1",    { 0.85, 0.01},     "RightCenter",  "888888",   pcn_font_size_default,    {{"PCN_UR_SEG", 1}})
add_layer("PCN_UR_SEG2",    { 0.85, 0.01},     "RightCenter",  "888888",   pcn_font_size_default,    {{"PCN_UR_SEG", 2}})
add_layer("PCN_UR_SEG3",    { 0.85, 0.01},     "RightCenter",  "888888",   pcn_font_size_default,    {{"PCN_UR_SEG", 3}})
add_layer("PCN_UR_SEG4",    { 0.85, 0.01},     "RightCenter",  "888888",   pcn_font_size_default,    {{"PCN_UR_SEG", 4}})
add_layer("PCN_UR_SEG5",    { 0.85, 0.01},     "RightCenter",  "888888",   pcn_font_size_default,    {{"PCN_UR_SEG", 5}})
add_layer("PCN_UR_SEG6",    { 0.85, 0.01},     "RightCenter",  "888888",   pcn_font_size_default,    {{"PCN_UR_SEG", 6}})
add_layer("PCN_UR_SEG7",    { 0.85, 0.01},     "RightCenter",  "ppppp ",   pcn_font_size_default,    {{"PCN_UR_SEG", 7}})
add_layer("PCN_UR_E",       {-0.10, 0.06},     "LeftCenter",   "E",        pcn_font_size_modifiers,  {{"PCN_UR_E"}})
add_layer("PCN_UR_W",       {-0.10,-0.04},     "LeftCenter",   "W",        pcn_font_size_modifiers,  {{"PCN_UR_W"}})
add_layer("PCN_UR_P",       {-0.04, 0.06},     "LeftCenter",   "+",        pcn_font_size_modifiers,  {{"PCN_UR_P"}})
add_layer("PCN_UR_M",       {-0.04,-0.04},     "LeftCenter",   "-",        pcn_font_size_modifiers,  {{"PCN_UR_M"}})


