SA-MP Forums Archive
Textdraw clickable size is massive. - 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: Textdraw clickable size is massive. (/showthread.php?tid=597782)



Textdraw clickable size is massive. - Alex_T - 04.01.2016

This is my code for the X. In the video you see that when I mouse over the X it has a massive range of where it can be clicked. How do I reduce this?

https://*********/wFGi_9Bcaec


Код:
	Dashboard_TDE[playerid][3] = CreatePlayerTextDraw(playerid, 490.399841, 81.692527, "X");
	PlayerTextDrawLetterSize(playerid, Dashboard_TDE[playerid][3], 0.400000, 1.600000);
	PlayerTextDrawAlignment(playerid, Dashboard_TDE[playerid][3], 1);
	PlayerTextDrawColor(playerid, Dashboard_TDE[playerid][3], -1);
	PlayerTextDrawSetShadow(playerid, Dashboard_TDE[playerid][3], 0);
	PlayerTextDrawSetOutline(playerid, Dashboard_TDE[playerid][3], 0);
	PlayerTextDrawBackgroundColor(playerid, Dashboard_TDE[playerid][3], 255);
	PlayerTextDrawFont(playerid, Dashboard_TDE[playerid][3], 1);
	PlayerTextDrawSetProportional(playerid, Dashboard_TDE[playerid][3], 1);
	PlayerTextDrawSetShadow(playerid, Dashboard_TDE[playerid][3], 0);
	PlayerTextDrawSetSelectable(playerid, Dashboard_TDE[playerid][3], true);



Re: Textdraw clickable size is massive. - Lucky13 - 04.01.2016

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

Check the Tip.


Re: Textdraw clickable size is massive. - Alex_T - 04.01.2016

Quote:
Originally Posted by Lucky13
Посмотреть сообщение
Thanks, but how about would I use. Is this correct? Or is it based off the 640x480 grid?

Код:
	Dashboard_TDE[playerid][3] = CreatePlayerTextDraw(playerid, 490.399841, 81.692527, "X");
	PlayerTextDrawLetterSize(playerid, Dashboard_TDE[playerid][3], 0.400000, 1.600000);
	PlayerTextDrawTextSize(playerid, Dashboard_TDE[playerid][3], 10.000000, 5.000000);//Here
	PlayerTextDrawAlignment(playerid, Dashboard_TDE[playerid][3], 1);
	PlayerTextDrawColor(playerid, Dashboard_TDE[playerid][3], -1);
	PlayerTextDrawSetShadow(playerid, Dashboard_TDE[playerid][3], 0);
	PlayerTextDrawSetOutline(playerid, Dashboard_TDE[playerid][3], 0);
	PlayerTextDrawBackgroundColor(playerid, Dashboard_TDE[playerid][3], 255);
	PlayerTextDrawFont(playerid, Dashboard_TDE[playerid][3], 1);
	PlayerTextDrawSetProportional(playerid, Dashboard_TDE[playerid][3], 1);
	PlayerTextDrawSetShadow(playerid, Dashboard_TDE[playerid][3], 0);
	PlayerTextDrawSetSelectable(playerid, Dashboard_TDE[playerid][3], true);



Re: Textdraw clickable size is massive. - Lucky13 - 04.01.2016

The Red box which the X is in is the actual X's Textdraw Box?


Re: Textdraw clickable size is massive. - Alex_T - 04.01.2016

No the This is using no box. It is text overtop of a Textdrawbox. I am trying to limit the selectable size of the X to just the red box but not sure how.


Re: Textdraw clickable size is massive. - Lucky13 - 04.01.2016

Try to make the red box be the actual X's box. This will definitely fix your problem.


Re: Textdraw clickable size is massive. - Alex_T - 04.01.2016

Problem with that is that you cant change the Y of the box. It is to big for that small part.


Re: Textdraw clickable size is massive. - Lucky13 - 04.01.2016

Quote:
Originally Posted by Alex_T
Посмотреть сообщение
Problem with that is that you cant change the Y of the box. It is to big for that small part.
If you are using Zamaroht's Textdraw Editor, you can edit the Y of a box with Change Text Size or Change Letter Size ( Not sure which one of these two xD )


Re: Textdraw clickable size is massive. - Alex_T - 04.01.2016

Yea, I played around with boxes and still adding a box didnt fix it.


Re: Textdraw clickable size is massive. - Lucky13 - 04.01.2016

Make sure the Box is for this Textdraw: Dashboard_TDE[playerid][3]