This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local WebMaterials = {} | |
function surface.GetURL(url, w, h, time) | |
if not url or not w or not h then return Material("error") end | |
if WebMaterials[url] then return WebMaterials[url] end | |
local WebPanel = vgui.Create( "HTML" ) | |
WebPanel:SetAlpha( 0 ) | |
WebPanel:SetSize( tonumber(w), tonumber(h) ) | |
WebPanel:OpenURL( url ) | |
WebPanel.Paint = function(self) | |
if not WebMaterials[url] and self:GetHTMLMaterial() then |