I start to creat my first MOTD using LUA but I don't know how to set the text size using lable.
[code]
local SampleLabel = vgui.Create( "DLabel", MainMenu )
SampleLabel:SetText( "Hello!" );
SampleLabel:SetPos( 250, 45 );
SampleLabel:SetTextColor( Color( 255, 35, 70, 255 ) )
[/code]
[QUOTE=R@Rdeathmatch;34341579]I start to creat my first MOTD using LUA but I don't know how to set the text size using lable.
[code]
local SampleLabel = vgui.Create( "DLabel", MainMenu )
SampleLabel:SetText( "Hello!" );
SampleLabel:SetPos( 250, 45 );
SampleLabel:SetTextColor( Color( 255, 35, 70, 255 ) )
[/code][/QUOTE]
The text size is dependant on the font itself, you have to create your own font in order to change its size.
[code]
local SampleLabel = vgui.Create( "DLabel", MainMenu )
SampleLabel:SetText( "RULES" );
SampleLabel:SetPos( 250, 45 );
SampleLabel:SetTextColor( Color( 255, 35, 70, 255 ) )
SampleLabel:SetFont( "HUDNumber2" )
[/code]
I tried this , it work but not perfectly
[editline]22nd January 2012[/editline]
I fix it :D.
I diden't add [code]SampleLabel:SizeToContents()[/code]
Sorry, you need to Log In to post a reply to this thread.