local meta = FindMetaTable("Panel")
local bcol2 = Color(150, 150, 150, 255)
function meta:MG_CarDealer_PaintListBarC(bcol)
	local bcol = bcol or Color(100, 100, 100, 255)
	self.VBar.btnDown.Paint = function(slf, w, h)
		surface.SetDrawColor(bcol2.r, bcol2.g, bcol2.b, 255)
		surface.DrawRect(0, 0, w, h)
	end
	self.VBar.btnUp.Paint = function(slf, w, h)
		surface.SetDrawColor(bcol2.r, bcol2.g, bcol2.b, 255)
		surface.DrawRect(0, 0, w, h)
	end
	self.VBar.btnGrip.Paint = function(slf, w, h)
		surface.SetDrawColor(bcol.r, bcol.g, bcol.b, 255)
		surface.DrawRect(0, 0, w, h)
	end
	self.VBar.Paint = function()
	end
end

function MG_CarDealer.String_Wrap(str, sizeX, font, data)
	local result = data or {}
	surface.SetFont(font)
	local entirelength = #str
	for lengthcheck1 = 1, entirelength do
		local scanstr = string.Left(str, lengthcheck1)
		local scanw = surface.GetTextSize(scanstr)
		if scanw >= sizeX then
			local prevword = string.Left(str, lengthcheck1 - 1)
			local lword = string.Right(str, entirelength - lengthcheck1 + 1)
			table.insert(result, prevword)
			return MG_CarDealer.String_Wrap(lword, sizeX, font, result)
		end
		if string.find(scanstr, "!n") then
			prevword = string.gsub(prevword, "!n", "")
			local lword = string.Right(str, entirelength - lengthcheck1)
			table.insert(result, prevword)
			return MG_CarDealer.String_Wrap(lword, sizeX, font, result)
		end
	end
	table.insert(result, str)
	return result
end