Clickable TextDraw Problem - 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: Clickable TextDraw Problem (
/showthread.php?tid=635340)
Clickable TextDraw Problem - adri[4]Life - 05.06.2017
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
Re: Clickable TextDraw Problem -
renatog - 05.06.2017
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.0, 150.0,"Example TextDraw");
TextDrawTextSize(MyTextDraw, 100.0 + aX, aY);
Re: Clickable TextDraw Problem - adri[4]Life - 05.06.2017
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.0, 150.0,"Example TextDraw");
TextDrawTextSize(MyTextDraw, 100.0 + aX, aY);
|
Thanks! +rep