aboutsummaryrefslogtreecommitdiff
path: root/gamemode/utility/svg/cl_svg.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/utility/svg/cl_svg.lua')
-rw-r--r--gamemode/utility/svg/cl_svg.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/gamemode/utility/svg/cl_svg.lua b/gamemode/utility/svg/cl_svg.lua
index 623c9e1..52b8556 100644
--- a/gamemode/utility/svg/cl_svg.lua
+++ b/gamemode/utility/svg/cl_svg.lua
@@ -1,5 +1,5 @@
local svg = {}
-local fn = nrequire("fn.lua")
+--local fn = nrequire("fn.lua")
local file_cache_max_size = 100
local file_cache_size = 0
local file_cache = {}
@@ -63,7 +63,7 @@ function svg.MaterialFromSVG(spath,background,foreground)
end
html:SetHTML(string.format([[
<style>%s%sbody{overflow:hidden}</style><body>%s</body>
-]],bgf,fgf,svgdata))
+]],background and bgf or "",fgf and foreground or "",svgdata))
local mat = {}
toprocess[#toprocess + 1] = {mat,html}
return mat
@@ -85,8 +85,8 @@ function svg.SvgOnDpanel(spath,background,foreground,dpanel)
local ret = {}
ret.html = vgui.Create("DHTML",dpanel)
ret.path = spath
- ret.fg = foreground
- ret.bg = background
+ ret.fg = foreground or Color(0,0,0,255)
+ ret.bg = background or Color(255,255,255,0)
ret.UpdateForeground = updatesvgfg
ret.UpdateBackground = updatesvgbg
ret.UpdateImage = updatesvgimg