include("shared.lua")

surface.CreateFont("mg_sellcrate_font", {font = "Roboto", size = 150, weight = 700, blursize = 0, antialias = true, shadow = true})
surface.CreateFont("mg_sellcrate_font2", {font = "Roboto", size = 50, weight = 700, blursize = 0, antialias = true, shadow = false})

local clr, local_ply = Color(150, 150, 50, 100)
local text = "Verkaufskiste"
local text2 = "Eure Bergbaukisten zum Verkaufen hier reintun."
function ENT:Draw()
	self:DrawModel()
	local_ply = local_ply or LocalPlayer()
	if local_ply:EyePos():DistToSqr(self:GetPos()) > 1000000 then return end
	local pos = self:GetPos()
	local ang = self:GetAngles()
	surface.SetFont("mg_sellcrate_font")
	local w = surface.GetTextSize(text)
	surface.SetFont("mg_sellcrate_font2")
	local w2 = surface.GetTextSize(text2)
	ang:RotateAroundAxis(ang:Up(), 90)
	ang:RotateAroundAxis(ang:Forward(), 90)
	cam.Start3D2D(pos + ang:Right() * 5 + ang:Up() * 33, ang, 0.1)
		draw.WordBox(8, -w * 0.5, -185, text, "mg_sellcrate_font", clr, color_white)
		draw.WordBox(8, -w2 * 0.5, 0, text2, "mg_sellcrate_font2", clr, color_white)
	cam.End3D2D()
end