Right aligned TextDraw? - 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: Right aligned TextDraw? (
/showthread.php?tid=290031)
Right aligned TextDraw? -
Programie - 13.10.2011
How can I align a TextDraw to the right?
I tried it with TextDrawAlignment() but if I set the alignment parameter to 3 (= right) the TextDraw disappears...
Any solution?
Re: Right aligned TextDraw? -
WLSF - 13.10.2011
Try to adjust X & Y position of the TextDraw (:
Re: Right aligned TextDraw? -
Programie - 13.10.2011
It seems that TextDrawAlignment does not change the alignment. WTF?
If I set it to 1 -> left top is 0 x 0
If I set it to 2 -> left top is 0 x 0
And... if I set it to 3 -> who knows it? left top is 0 x 0
My TextDraw test script:
Код:
#include <a_samp>
new Text:td1;
new Text:td2;
new Text:td3;
public OnFilterScriptInit()
{
td1 = TextDrawCreate(100, 100, "LEFT");
td2 = TextDrawCreate(100, 100, "CENTER");
td3 = TextDrawCreate(100, 100, "RIGHT");
TextDrawAlignment(td1, 1);
TextDrawAlignment(td2, 2);
TextDrawAlignment(td3, 3);
TextDrawShowForAll(td1);
TextDrawShowForAll(td2);
TextDrawShowForAll(td3);
return true;
}
public OnFilterScriptExit()
{
TextDrawDestroy(td1);
TextDrawDestroy(td2);
TextDrawDestroy(td3);
return true;
}
And the output:
In the normal case, the right text should appear 100 pixels from the right...?