• vgui HTML
    8 replies, posted
Alright, so after the recent update the HTML control hasn't been working correctly. If you use HTML:SetSize, it will make the control invisible, but it will be visible if you don't use it, but then it's not the correct size. Example; [lua] // Visible local Page = vgui.Create("HTML") Page:OpenURL("google.com") Page:Center() // Not visible local Page = vgui.Create("HTML") Page:SetSize(400, 400) Page:OpenURL("google.com") Page:Center() [/lua] It used to work fine before, but not anymore. And I know it's not just me not seeing the control, because I asked other players did they see it.
How about docking it into another panel and set the size of that panel instead? [i]HTML:Dock(FILL)[/i]
[QUOTE=vercas;36551933]How about docking it into another panel and set the size of that panel instead? [i]HTML:Dock(FILL)[/i][/QUOTE] Good idea, I'll try that. Edit: [lua] local Dock = vgui.Create( "DFrame" ) Dock:SetSize( 400, 400 ) Dock:ShowCloseButton( true ) Dock:MakePopup() Dock:Center() local Page = vgui.Create( "HTML", Dock ) Page:Dock( Dock ) Page:OpenURL( "google.com" ) Page:Center() [/lua] Results in the HTML control being very small, just like when SetSize is not used.
Apparently the controll broke in the last update.
[QUOTE=Assault_Trooper;36552096]Good idea, I'll try that. Edit: [lua] local Dock = vgui.Create( "DFrame" ) Dock:SetSize( 400, 400 ) Dock:ShowCloseButton( true ) Dock:MakePopup() Dock:Center() local Page = vgui.Create( "HTML", Dock ) Page:Dock( Dock ) Page:OpenURL( "google.com" ) Page:Center() [/lua] Results in the HTML control being very small, just like when SetSize is not used.[/QUOTE] [code]Page:Dock(FILL)[/code] FILL is a docking type. [b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index7baf.html]Panel.Dock [img]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[QUOTE=vercas;36552278][code]Page:Dock(FILL)[/code] FILL is a docking type.[/QUOTE] Oh, lol, sorry my bad. That seems to actually work. Would still be nice if the SetSize worked though.
And with the latest update it displays a blank white page, no matter what you do. Damn.
[QUOTE=Assault_Trooper;36595625]And with the latest update it displays a blank white page, no matter what you do. Damn.[/QUOTE] Can also confirm this I tweet'd garry about it to see if there is anything special we need to do now, no reply currently
Garry implemented awesomenium in gm13.
Sorry, you need to Log In to post a reply to this thread.