SA-MP Forums Archive
Selecting 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: Selecting textdraw problem (/showthread.php?tid=621061)



Selecting textdraw problem - PeanutButter - 06.11.2016

I'm trying to make a little close button for my textdraw. The X button should become white when selected.
But when I hover my mouse over the orange part that I drew, the X becomes white.
How do I only make the X clickable when the mouse is on it?



Код:
	XSign = TextDrawCreate(591.999877, 121.125930, "X");
	TextDrawTextSize(XSign, 574.999511, 574.999511);
	TextDrawLetterSize(XSign, 0.400000, 1.600000);
	TextDrawColor(XSign, 0xFF0000FF);
	TextDrawSetShadow(XSign, 0);
	TextDrawSetOutline(XSign, 0);
	TextDrawFont(XSign, 2);
	TextDrawSetSelectable(XSign, 1);



Re: Selecting textdraw problem - GoldenLion - 06.11.2016

You need to adjust the text size of the textdraw.
Here: https://sampwiki.blast.hk/wiki/TextDrawTextSize


Re: Selecting textdraw problem - Threshold - 06.11.2016

https://sampwiki.blast.hk/wiki/TextDrawSetSelectable
Quote:

Use TextDrawTextSize to define the clickable area.

https://sampwiki.blast.hk/wiki/TextDrawTextSize
Quote:

This function defines the clickable area for use with TextDrawSetSelectable, whether a box is shown or not.




Re: Selecting textdraw problem - PeanutButter - 06.11.2016

i cant figure out which X and Y to use


Re: Selecting textdraw problem - StrikerZ - 06.11.2016

PHP код:
TextDrawTextSize({textdraw name}, 261.5000000.000000); 
would be enough


Re: Selecting textdraw problem - ISmokezU - 06.11.2016

Quote:
Originally Posted by Sunehildeep
Посмотреть сообщение
PHP код:
TextDrawTextSize({textdraw name}, 261.5000000.000000); 
would be enough
Код:
TextDrawTextSize({textdraw name}, 261.500000, 0.000000);
Must not be 0


Re: Selecting textdraw problem - StrikerZ - 06.11.2016

Try this
PHP код:
TextDrawTextSize({textdraw name},391.00000,10.0000); 
This should work


Re: Selecting textdraw problem - PeanutButter - 06.11.2016

The X is not changing color anymore with any of these coordinates for some reason.


Re: Selecting textdraw problem - Pottus - 06.11.2016

Quote:
Originally Posted by PeanutButter
Посмотреть сообщение
The X is not changing color anymore with any of these coordinates for some reason.
What do you expect when you get help from some dude from India.