How can i make text align correctly? As in, allign like draw.RoundedBox does, where its position is in its upper left, so if i change its length, it will still stay in the same place. How can i do this with text. I tried TEXT_ALLIGN_CENTER, LEFT, and RIGHT. No luck.
You need to scale the width and height and position to the player's screen. You do that with ScrW() and ScrH()
DermaPanel:SetPos( ScrW() / 2, ScrH() / 2 )
Neither of those really answer the question at all
[lua]
draw.SimpleText( "Text", "Font", ScrW() / 2, ScrH() / 2, Color( 255, 255, 255, 255 ) )
[/lua]
That places the text half over and half high on the player's screen.
But if i increase the length of the text, will the first letter be in the same place?
Sorry, you need to Log In to post a reply to this thread.