Clickable textdraws
#1

Hi guyz,



if I want to select A3 textdraw, just like on picture, it's selecting A1 and A2. How to set this to hover only A3, not others? I can't find any good tutorial, or, if someone can explain how this works. Thank you.
Reply
#2

Current code?
Reply
#3

I found picture in other thread, with same problem. But here U go:
Код:
TD_Login[9][playerid] = CreatePlayerTextDraw(playerid, 479.999969, 191.146636, "Forgotten password?");
	PlayerTextDrawLetterSize(playerid, TD_Login[9][playerid], 0.300000, 1.200000);
	PlayerTextDrawTextSize(playerid, TD_Login[9][playerid], 159.199981, 51.199990);
	PlayerTextDrawAlignment(playerid, TD_Login[9][playerid], 1);
	PlayerTextDrawColor(playerid, TD_Login[9][playerid], -1);
	PlayerTextDrawSetShadow(playerid, TD_Login[9][playerid], 0);
	PlayerTextDrawSetOutline(playerid, TD_Login[9][playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, TD_Login[9][playerid], 51);
	PlayerTextDrawFont(playerid, TD_Login[9][playerid], 1);
	PlayerTextDrawSetProportional(playerid, TD_Login[9][playerid], 1);
	PlayerTextDrawSetSelectable(playerid, TD_Login[9][playerid], true);
Reply
#4

I had this problem before , got mad of it , So look the solution is using TextDrawTextSize to set the text size not letter size

To stop the textdraw from expanding it's Textsize, Use TextDrawTextSize

I see that every option in the menu has the same size as the other , so

Make a limit for X & Y

maybe? ..:
pawn Код:
TextDrawTextSize( Yourtextdrawid, 180.00000, 20.0000);
if not hovering , try to increase them, if hovering much more(same problem) , decrease them
180.00000 = X in 2D Left - Right
20.0000 = Y in 2D Up - Down

when you target at the textdraw from up to down or down to up and it only hovered the targeted text (one text) , It works with Y then no need to change it, and when you target it from right to left or left to right and hovered only the text, then everything is fine,


TextDrawTextSize do it for all texts

More info: https://sampwiki.blast.hk/wiki/TextDrawTextSize
Reply
#5

Hmmm, still I don't get it. How can I know which text size to set?
Reply
#6

I'm using Ipleomax, but still I can't make good textdraw. I dunno how to use text size tool to set clickable area. Help?
Reply
#7

TextDrawTextSize used to set box's size , but you can use it to limit the >>- CLICKABLE AREA <<-
You can't see the clickable area yea.. So i suggest you to enable box for a temp time, Set the box size with textdrawtextsize while the box hovers all the text , no more expands out of the text, then Save the size, Remove the box.

That's all.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)