textdrawselect problem
#1

hello, im having a problem with selecting a textdraw.. when im pointing next to the textdraw it selects it, i want it to be selected only when the mouse pointer is on it, moreoever when im trying to select other close textdraws it will select every other textdraw behind. I'll show pictures of what i mean:


You cant see the mouse pointer, but watch out for the difference from other pictures.


Here im pointing on the other textdraw, and you can see the last textdraw is still highlighted..


Here im just pointing the bottom of the box and it highlights all the textdraws.
I need it to highlight every textdraw by its own and not all at the same time. What is probably wrong with the code?
Reply
#2

From wiki: https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw

The clickable area is defined by TextDrawTextSize. The x and y parameters passed to that function must not be zero or negative.

Your textdrawsize might be misplaced or wrongly sized.
Reply
#3

Quote:
Originally Posted by shadowdog
Посмотреть сообщение
From wiki: https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw

The clickable area is defined by TextDrawTextSize. The x and y parameters passed to that function must not be zero or negative.

Your textdrawsize might be misplaced or wrongly sized.
must not be zero only on the clickable textdraws or on every textdraw in range?
because the y is 0 in every box.. (which isn't clickable)
Reply
#4

I'm not sure if that will change anything but you can try.

I think your problem is that your textsizes are too big, causing them to overlap. Which will then result in all of them highlighting, because your cursor is in all of their fields at once.

I would suggest editing the size to the exact box sizes.
Reply
#5

Quote:
Originally Posted by shadowdog
Посмотреть сообщение
I'm not sure if that will change anything but you can try.

I think your problem is that your textsizes are too big, causing them to overlap. Which will then result in all of them highlighting, because your cursor is in all of their fields at once.

I would suggest editing the size to the exact box sizes.
I want the text to be sized like in the pictures showen. If im sizing everything to the box it will then be 1 big mess isn't it?..

I will try now mess with it, but it doesnt make such a sence.. I cant understand why im using lettersize 0.259999, 1.330368 and its too big ._.
btw, only on the buttons there is additional box what about male and female buttons?
Reply
#6

You need to set textdraw alligment to 2 and textdrawsize(x,y) it defines the select box so when u put your mouse on textdraw where should it start selecting it if u dont understand me pm me Ill try to explain it to you better
Reply
#7

Ohhh, now i understand! Thank you Shadowdog, i was confused between lettersize and textsize, while textsize is also the clickable area, i thought it was used only for the box and deleted it for the clickable textdraws thats why it didnt work, thanks man you are awesome! +rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)