I am trying to make a simple billboard but have stumbled across an issue where by if the server has a long name like most it will stick off the edge like in this picture:
[IMG]http://i.imgur.com/qZQxHFd.jpg[/IMG]
Or on the other hand is there a way to cut it off at the end automatically with a ... or something similar,
Here is a snip of my code:
[CODE] local pos = self:GetPos()
local ang = self:GetAngles()
local slots = game.MaxPlayers()
local currentplys = player.GetCount()
ang:RotateAroundAxis(ang:Up(),90)
cam.Start3D2D(pos+ang:Up()*1.6,ang,0.1)
draw.RoundedBox(0,0-710,0-475,1420,945,Color(0,0,0))
draw.SimpleTextOutlined("Welcome to, ".. GetHostName(),"h1",0-675,0-425,Color(0,0,0),0,1,1,Color(0,255,0))
draw.SimpleTextOutlined(currentplys .."/".. slots .." players","h2",575,425,Color(0,0,0),1,1,1,Color(0,255,0))
cam.End3D2D()[/CODE]
What about if you use markup and then you create the outline by iterations of it in x and y
You can use a word wrap function like the one [URL="https://github.com/SuperiorServers/dash/blob/904ce638f081b2e2fb58975d0637bd5e25388027/lua/dash/extensions/client/string.lua"]here[/URL] and use a draw call for each line.
[QUOTE=gonzalolog;52551580]What about if you use markup and then you create the outline by iterations of it in x and y[/QUOTE]
This some-what works, thanks for the advice :)
[editline]8th August 2017[/editline]
[QUOTE=code_gs;52551583]You can use a word wrap function like the one [URL="https://github.com/SuperiorServers/dash/blob/904ce638f081b2e2fb58975d0637bd5e25388027/lua/dash/extensions/client/string.lua"]here[/URL] and use a draw call for each line.[/QUOTE]
Thanks for the advice :)
[editline]8th August 2017[/editline]
[IMG]http://i.imgur.com/OpvakTx.png[/IMG]
Thanks [URL="https://facepunch.com/member.php?u=405388"]gonzalolog[/URL] :)
Sorry, you need to Log In to post a reply to this thread.