local STR = MG_CarDealer.TunerElement_CreateStruct("ledstrip")
STR.PrintName = "LED-Streifen"
STR.Icon = "rainbow"
STR.Max = 2

STR:Editor_AddSpacer("Position")
local VAR = STR:AddVars("Position_X", "number")
VAR.Min = -50
VAR.Max = 50
local VAR = STR:AddVars("Position_Y", "number")
VAR.Min = -50
VAR.Max = 50
local VAR = STR:AddVars("Position_Z", "number")
VAR.Min = -50
VAR.Max = 50
VAR.StartValue = 50
STR:Editor_AddSpacer("Winkel")
local VAR = STR:AddVars("Winkel_P", "number")
VAR.Min = 0
VAR.Max = 360 
local VAR = STR:AddVars("Winkel_Y", "number")
VAR.Min = 0
VAR.Max = 360
STR:Editor_AddSpacer("Weiteres")
local VAR = STR:AddVars("Breite", "number")
VAR.Min = 1
VAR.Max = 200
VAR.StartValue = 100
local VAR = STR:AddVars("Dicke", "number")
VAR.Min = 1
VAR.Max = 10
VAR.StartValue = 3

STR:Editor_AddSpacer("Farbe")
STR:AddVars("Farbe", "color")

local MAT_BEAM = Material("sprites/physgbeamb")
function STR:Render(tunesys, vars)
	render.SetMaterial(MAT_BEAM)
	local pos = tunesys:GetPos()
	local ang = tunesys:GetAngles()
	pos = pos + ang:Forward() * vars["Position_X"]
	pos = pos + ang:Right() * vars["Position_Y"]
	pos = pos + ang:Up() * vars["Position_Z"]
	local angk = Angle(vars["Winkel_P"], vars["Winkel_Y"], 0)
	angk = angk + tunesys:GetAngles()
	local pos2 = pos + angk:Forward() * vars["Breite"]
	render.DrawBeam(pos, pos2, vars["Dicke"], 1, 1, vars["Farbe"]) 
end

TunerElement.Register(STR)