Very simple Textdraw question
#1

Hey guys!

I've never needed to script Textdraws... until now.
Due to the fact that the wiki-entries of the Textdraw functions are pretty nontransparent, I've got some questions about the use of Textdraws. I've scripted this code:

pawn Код:
pText = TextDrawCreate(495.000,110.000,"_");
TextDrawUseBox(pText, 1);
TextDrawAlignment(pText, 1);
TextDrawBoxColor(pText, 0x00006644);
TextDrawTextSize(pText, 615, 350);
TextDrawBackgroundColor(pText, 0x00004444);
TextDrawShowForPlayer(playerid, pText);
What it should do is display a blue box from the bottom of the "cash-display" (the default one from GTA) to the bottom of the screen. But all it displays is a blue bar.
Now to my question:
For me it's pretty weird that whatever value I take for TextDrawTextSize, it does not change its vertical size, thus does not expand in y-direction. Do Textdraws need to have Text of the required height implemented or is there a possibility to set its size without using TextDrawLetterSize?

Those functions seem very weird to me, they just don't want to do what I want them to do.
As soon as I got all this Textdraw-stuff right, I will edit the wiki-pages so it will become easier for other people to get into Textdraws.
(One question that does not have to do with this actually: During my time (1 year ago) I was able to search in the wiki properly, now I can't. Does everyone have that problem or did I f*ck up my computer in some way? If this is wiki-related, why did they do that?! )

Thanks for your help in advance.
Reply
#2

Quote:
Originally Posted by DeathOnaStick
Посмотреть сообщение
possibility to set its size without using TextDrawLetterSize?
Hmmm, You only can set its size with TextDrawLetterSize As far as i know.

and for

Quote:
Originally Posted by DeathOnaStick
Посмотреть сообщение
Do Textdraws need to have Text of the required height implemented?
No.
Reply
#3

Alright thanks so far although there is a little contradiction in your answer I think I know what you mean.

Anyway the note in the wiki is very misleading if you are correct. It says:

Quote:
Note: When using this function purely for the benefit of affecting the TextDraw box, multiply 'Y' by 0.135 to convert to TextDrawTextSize-like measurements.
It does not say that this is the only way to set the vertical size of a textdraw. If there are more people that are sure it's the only way to set the size in a textdraw I will change the wiki entry. Waiting for affirmation first though.
Reply
#4

Well, yeah im not sure too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)