Discord
Steam
/
Garry's Mod
/
Developers
/
Using HTML as ..
Login/Join
Event Log
Using HTML as a GUI results in an unfinished string
2 replies, posted
Search
In This Thread
-snip-
i believe you can use [[]] sethtml([[codens]])
There are multiple problems with this. [code] local HTML = vgui.Create( "HTML", Admin ) [/code] should be: [code] local HTML = vgui.Create( "DHTML", Admin ) [/code] [code] html:SetAllowLua( true ) [/code] should be: [code] HTML:SetAllowLua( true ) [/code] [code]HTML:SetHTML(" <!DOCTYPE html> <html> <head> <title>Menu</title> <link href='https://fonts.googleapis.com/css?family=Quicksand:400,700' rel='stylesheet' type='text/css'/> <!-- Load Font--> <link rel=\"stylesheet\" type=\"text/css\" href=\"http://verysecretcssfile.com/nice.css\"> <!-- Load css file--> <link href=\"https://netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.min.css\" rel=\"stylesheet\"/> <!-- Load Icons--> </head> <body> <video autoplay loop id=\"video-background\" muted plays-inline> <source src=\"background.mp4\" type=\"video/mp4\"> </video> <div id=\"CenterAF\"> <div class=\"wrap\"> <div class=\"one\"> <ul class=\"form\"> <li><a class=\"profile\" href=\"#\"><i class=\"icon-warning-sign\"></i>Reports</a></li> <hr class=\"hr\"> <li class=\"settings\"><a class=\"messages\" href=\"#\"><i class=\"icon-list\"></i>Players</a></li> <hr class=\"hr\"> <li><a class=\"settings\" href=\"#\"><i class=\"icon-search\"></i>Logs</a></li> <hr class=\"hr\"> </ul> <div id=\"time\"> <hr class=\"hr\"> Tijd </div> </div> <div class=\"two\"> PANEL </div> </div> </div> </body> </html>") [/code] Is messy, should be: [code] HTML:SetHTML([[ <!DOCTYPE html> <html> <head> <title>Menu</title> <link href='https://fonts.googleapis.com/css?family=Quicksand:400,700' rel='stylesheet' type='text/css'/> <!-- Load Font--> <link rel="stylesheet" type="text/css" href="http://verysecretcssfile.com/nice.css"> <!-- Load css file--> <link href="https://netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.min.css" rel="stylesheet"/> <!-- Load Icons--> </head> <body> <video autoplay loop id="video-background" muted plays-inline> <source src="background.mp4" type="video/mp4"> </video> <div id="CenterAF"> <div class="wrap"> <div class="one"> <ul class="form"> <li><a class="profile" href="#"><i class="icon-warning-sign"></i>Reports</a></li> <hr class="hr"> <li class="settings"><a class="messages" href="#"><i class="icon-list"></i>Players</a></li> <hr class="hr"> <li><a class="settings" href="#"><i class="icon-search"></i>Logs</a></li> <hr class="hr"> </ul> <div id="time"> <hr class="hr"> Tijd </div> </div> <div class="two"> PANEL </div> </div> </div> </body> </html> ]]) [/code]
Sorry, you need to
Log In
to post a reply to this thread.