Clickable TextDraw Problem
#1

hi guys, i was working on a Textdraw so when i tested it (testing the TD Selection) without Selecting it, it's color Get changed :C While The Cursor was too far from that TD
Video: https://www.youtube.com/watch?v=GkmNGzm_F3E
Code:
Код:
	PredatorTD[8] = TextDrawCreate(457.276824, 85.166633, "Bravo Base");
	TextDrawLetterSize(PredatorTD[8], 0.449999, 1.600000);
	TextDrawAlignment(PredatorTD[8], 1);
	TextDrawColor(PredatorTD[8], -1);
	TextDrawSetShadow(PredatorTD[8], 0);
	TextDrawSetOutline(PredatorTD[8], 1);
	TextDrawBackgroundColor(PredatorTD[8], 51);
	TextDrawFont(PredatorTD[8], 2);
	TextDrawSetProportional(PredatorTD[8], 1);
	TextDrawSetSelectable(PredatorTD[8], true);
this is not first time i got this problem :c i always get it on these Normal TDs but preview always works fine
Thanks in advance
Reply
#2

To define textdraw's clickable area you need to use TextDrawTextSize:
The "X" parameter you need to provide textdraw's X position plus it's clickable area in X axis;
The "Y" parameter you need to provide only the clickable area in Y axis;

e.g.
Let's say you have a textdraw in position (100.0, 150.0) and the clickable area in X/Y axis is aX, aY;
PHP код:
MyTextDraw TextDrawCreate(100.0150.0,"Example TextDraw");
TextDrawTextSize(MyTextDraw100.0 aXaY); 
Reply
#3

Quote:
Originally Posted by renatog
Посмотреть сообщение
To define textdraw's clickable area you need to use TextDrawTextSize:
The "X" parameter you need to provide textdraw's X position plus it's clickable area in X axis;
The "Y" parameter you need to provide only the clickable area in Y axis;

e.g.
Let's say you have a textdraw in position (100.0, 150.0) and the clickable area in X/Y axis is aX, aY;
PHP код:
MyTextDraw TextDrawCreate(100.0150.0,"Example TextDraw");
TextDrawTextSize(MyTextDraw100.0 aXaY); 
Thanks! +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)