SA-MP Forums Archive
Textdraw alignment - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraw alignment (/showthread.php?tid=459675)



Textdraw alignment - RajatPawar - 24.08.2013

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........||


Re: Textdraw alignment - Finn - 24.08.2013

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.


Re: Textdraw alignment - RajatPawar - 24.08.2013

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


Re: Textdraw alignment - Finn - 24.08.2013

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

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