Hi everyone,
I'm currently creating a F4 Menu but I met a problem while I was writing my description. Indeed, my description is going outside my panel and I don't know how to fix it. Is there anyone who could help me please ?
local ScrollBar = vgui.Create( "DScrollPanel", mycommandspanel )
for k, v in pairs(RPExtraTeams) do
local jobpanel = vgui.Create( "DPanel", ScrollBar )
jobpanel:Dock(TOP)
jobpanel:SetSize(0*Wss, 125*Hss )
jobpanel:DockMargin(7.5*Wss , 7.5*Hss, 7.5*Wss, 7.5*Hss)
jobpanel.Paint = function( self, w, h )
draw.RoundedBox( 2.5, 0, 0, 660.5*Wss, 142.5*Hss, v.color )
draw.RoundedBox( 1.5, 1.5*Wss, 2.5*Hss, 622.5*Wss, 120*Hss, Color(255, 255, 255, 255) )
end
local desW, desH = surface.GetTextSize( v.description)
local jobdescription = vgui.Create( "DLabel", jobpanel )
jobdescription:SetText( v.description )
jobdescription:Dock(TOP)
jobdescription:SetFont( "mydescriptionfont" )
jobdescription:SetColor( Color(28, 13, 193, 255) )
jobdescription:SetSize(desW*Wss, desH*Hss)
jobdescription:DockMargin( 30*Wss , 5*Hss, 5*Wss, 50*Hss)
end
https://image.noelshack.com/fichiers/2018/43/2/1540297336-f44.png
Dock it using FILL and do DLabel:SetWrap(true).
Sorry, you need to Log In to post a reply to this thread.