Right aligned TextDraw?
#1

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?
Reply
#2

Try to adjust X & Y position of the TextDraw (:
Reply
#3

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


Forum Jump:


Users browsing this thread: 2 Guest(s)