Textdraw alignment
#1

Hello.
I have a TITLE textdraw that is shown in a box. Approximately it gets created at the center when the TITLE is 5 lettered or something (like "Garage") or something. But an increase in the title string messes up the alignment. The whole text shifts obviously, to the right. Would there be an option to auto align it? I could make up a stock depending on the string length, but frankly it would be a pain, checking for string length and overwriting and creating a new textdraw each time...

Scenario:

||..........GARAGE...........||

When a lot of characters:

||..........POLICE GARAGE...||

How do I want it:

||........POLICE GARAGE........||
Reply
#2

Did you know when you put the text draw alignment to center, the box X size will be set with text Y size? It's strange, but it works that way for some reason.
Reply
#3

My title is a separate textdraw positioned on an another textdraw box. I didn't understand your statement, but uhm..
Reply
#4

So what's the problem then? Just change the text draw alignment to centered.

pawn Код:
TextDrawAlignment(MyTextdraw, 2);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)