Textdraw selectable, mouse selects all textdraws...
#1

Код:
loginText[1] = CreatePlayerTextDraw(playerid, 82.459777, 5.249969, "LOGIN");
	PlayerTextDrawLetterSize(playerid, loginText[1], 0.449999, 1.600000);
 	PlayerTextDrawTextSize(playerid, loginText[1], 2.000000, 3.600000);
as you can see, I also have ..TextSize, and it doesnt help

large code:
Код:
loginText[0] = CreatePlayerTextDraw(playerid, 641.531494, 1.500000, "usebox");
	PlayerTextDrawLetterSize(playerid, loginText[0], 0.000000, 2.405555);
	PlayerTextDrawTextSize(playerid, loginText[0], -2.000000, 0.000000);
	PlayerTextDrawAlignment(playerid, loginText[0], 1);
	PlayerTextDrawColor(playerid, loginText[0], 0);
	PlayerTextDrawUseBox(playerid, loginText[0], true);
	PlayerTextDrawBoxColor(playerid, loginText[0], 102);
	PlayerTextDrawSetShadow(playerid, loginText[0], 0);
	PlayerTextDrawSetOutline(playerid, loginText[0], 0);
	PlayerTextDrawFont(playerid, loginText[0], 0);

	loginText[1] = CreatePlayerTextDraw(playerid, 82.459777, 5.249969, "LOGIN");
	PlayerTextDrawLetterSize(playerid, loginText[1], 0.449999, 1.600000);
 	PlayerTextDrawTextSize(playerid, loginText[1], 2.000000, 3.600000);
	PlayerTextDrawAlignment(playerid, loginText[1], 2);
	PlayerTextDrawColor(playerid, loginText[1], -1);
	PlayerTextDrawSetShadow(playerid, loginText[1], 0);
	PlayerTextDrawSetOutline(playerid, loginText[1], 0);
	PlayerTextDrawBackgroundColor(playerid, loginText[1], 51);
	PlayerTextDrawFont(playerid, loginText[1], 2);
	PlayerTextDrawSetProportional(playerid, loginText[1], 1);
	PlayerTextDrawSetSelectable(playerid, loginText[1], true);

	loginText[2] = CreatePlayerTextDraw(playerid, 120.941482, 5.666625, "/");
	PlayerTextDrawLetterSize(playerid, loginText[2], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, loginText[2], 2);
	PlayerTextDrawColor(playerid, loginText[2], -1);
	PlayerTextDrawSetShadow(playerid, loginText[2], 0);
	PlayerTextDrawSetOutline(playerid, loginText[2], 0);
	PlayerTextDrawBackgroundColor(playerid, loginText[2], 51);
	PlayerTextDrawFont(playerid, loginText[2], 2);
	PlayerTextDrawSetProportional(playerid, loginText[2], 1);

	loginText[3] = CreatePlayerTextDraw(playerid, 175.386032, 5.083226, "REGISTER");
	PlayerTextDrawLetterSize(playerid, loginText[3], 0.449999, 1.600000);
	PlayerTextDrawTextSize(playerid, loginText[1], 2.000000, 3.600000);
	PlayerTextDrawAlignment(playerid, loginText[3], 2);
	PlayerTextDrawColor(playerid, loginText[3], -1);
	PlayerTextDrawSetShadow(playerid, loginText[3], 0);
	PlayerTextDrawSetOutline(playerid, loginText[3], 0);
	PlayerTextDrawBackgroundColor(playerid, loginText[3], 51);
	PlayerTextDrawFont(playerid, loginText[3], 2);
	PlayerTextDrawSetProportional(playerid, loginText[3], 1);
	PlayerTextDrawSetSelectable(playerid, loginText[3], true);

	loginText[4] = CreatePlayerTextDraw(playerid, 231.575424, 6.083298, "/");
	PlayerTextDrawLetterSize(playerid, loginText[4], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, loginText[4], 2);
	PlayerTextDrawColor(playerid, loginText[4], -1);
	PlayerTextDrawSetShadow(playerid, loginText[4], 0);
	PlayerTextDrawSetOutline(playerid, loginText[4], 0);
	PlayerTextDrawBackgroundColor(playerid, loginText[4], 51);
	PlayerTextDrawFont(playerid, loginText[4], 2);
	PlayerTextDrawSetProportional(playerid, loginText[4], 1);

	loginText[5] = CreatePlayerTextDraw(playerid, 272.901458, 5.499893, "ABOUT");
	PlayerTextDrawLetterSize(playerid, loginText[5], 0.449999, 1.600000);
 	PlayerTextDrawTextSize(playerid, loginText[1], 2.000000, 3.600000);
	PlayerTextDrawAlignment(playerid, loginText[5], 2);
	PlayerTextDrawColor(playerid, loginText[5], -1);
	PlayerTextDrawSetShadow(playerid, loginText[5], 0);
	PlayerTextDrawSetOutline(playerid, loginText[5], 0);
	PlayerTextDrawBackgroundColor(playerid, loginText[5], 51);
	PlayerTextDrawFont(playerid, loginText[5], 2);
	PlayerTextDrawSetProportional(playerid, loginText[5], 1);
	PlayerTextDrawSetSelectable(playerid, loginText[5], true);

	loginText[6] = CreatePlayerTextDraw(playerid, 19.677917, 7.000031, "hud:radar_waypoint");
	PlayerTextDrawLetterSize(playerid, loginText[6], 0.000000, 0.000000);
	PlayerTextDrawTextSize(playerid, loginText[6], 13.118618, 15.166664);
	PlayerTextDrawAlignment(playerid, loginText[6], 1);
	PlayerTextDrawColor(playerid, loginText[6], -1);
	PlayerTextDrawSetShadow(playerid, loginText[6], 0);
	PlayerTextDrawSetOutline(playerid, loginText[6], 0);
	PlayerTextDrawFont(playerid, loginText[6], 4);

	loginText[7] = CreatePlayerTextDraw(playerid, 641.531494, 26.000000, "usebox");
	PlayerTextDrawLetterSize(playerid, loginText[7], 0.000000, -0.251852);
	PlayerTextDrawTextSize(playerid, loginText[7], -2.000000, 0.000000);
	PlayerTextDrawAlignment(playerid, loginText[7], 1);
	PlayerTextDrawColor(playerid, loginText[7], 0);
	PlayerTextDrawUseBox(playerid, loginText[7], true);
	PlayerTextDrawBoxColor(playerid, loginText[7], -5963521);
	PlayerTextDrawSetShadow(playerid, loginText[7], 0);
	PlayerTextDrawSetOutline(playerid, loginText[7], 0);
	PlayerTextDrawFont(playerid, loginText[7], 0);

	loginText[8] = CreatePlayerTextDraw(playerid, 614.825805, 150.250000, "usebox");
	PlayerTextDrawLetterSize(playerid, loginText[8], 0.000000, 22.822221);
	PlayerTextDrawTextSize(playerid, loginText[8], 426.228424, 0.000000);
	PlayerTextDrawAlignment(playerid, loginText[8], 1);
	PlayerTextDrawColor(playerid, loginText[8], 0);
	PlayerTextDrawUseBox(playerid, loginText[8], true);
	PlayerTextDrawBoxColor(playerid, loginText[8], 102);
	PlayerTextDrawSetShadow(playerid, loginText[8], 0);
	PlayerTextDrawSetOutline(playerid, loginText[8], 0);
	PlayerTextDrawFont(playerid, loginText[8], 0);

	loginText[9] = CreatePlayerTextDraw(playerid, 615.294311, 147.916656, "usebox");
	PlayerTextDrawLetterSize(playerid, loginText[9], 0.000000, -0.251850);
	PlayerTextDrawTextSize(playerid, loginText[9], 425.291381, 0.000000);
	PlayerTextDrawAlignment(playerid, loginText[9], 1);
	PlayerTextDrawColor(playerid, loginText[9], 0);
	PlayerTextDrawUseBox(playerid, loginText[9], true);
	PlayerTextDrawBoxColor(playerid, loginText[9], -5963521);
	PlayerTextDrawSetShadow(playerid, loginText[9], 0);
	PlayerTextDrawSetOutline(playerid, loginText[9], 0);
	PlayerTextDrawFont(playerid, loginText[9], 0);

	loginText[10] = CreatePlayerTextDraw(playerid, 614.357238, 163.083343, "usebox");
	PlayerTextDrawLetterSize(playerid, loginText[10], 0.000000, 2.275923);
	PlayerTextDrawTextSize(playerid, loginText[10], 426.228424, 0.000000);
	PlayerTextDrawAlignment(playerid, loginText[10], 1);
	PlayerTextDrawColor(playerid, loginText[10], 0);
	PlayerTextDrawUseBox(playerid, loginText[10], true);
	PlayerTextDrawBoxColor(playerid, loginText[10], 102);
	PlayerTextDrawSetShadow(playerid, loginText[10], 0);
	PlayerTextDrawSetOutline(playerid, loginText[10], 0);
	PlayerTextDrawFont(playerid, loginText[10], 0);

	loginText[11] = CreatePlayerTextDraw(playerid, 520.995727, 162.749969, "LOGIN");
	PlayerTextDrawLetterSize(playerid, loginText[11], 0.610701, 2.125000);
	PlayerTextDrawAlignment(playerid, loginText[11], 2);
	PlayerTextDrawColor(playerid, loginText[11], -1);
	PlayerTextDrawSetShadow(playerid, loginText[11], 0);
	PlayerTextDrawSetOutline(playerid, loginText[11], 1);
	PlayerTextDrawBackgroundColor(playerid, loginText[11], 51);
	PlayerTextDrawFont(playerid, loginText[11], 1);
	PlayerTextDrawSetProportional(playerid, loginText[11], 1);

	loginText[12] = CreatePlayerTextDraw(playerid, 592.805297, 236.000000, "usebox");
	PlayerTextDrawLetterSize(playerid, loginText[12], 0.000000, 2.016664);
	PlayerTextDrawTextSize(playerid, loginText[12], 451.060028, 0.000000);
	PlayerTextDrawAlignment(playerid, loginText[12], 1);
	PlayerTextDrawColor(playerid, loginText[12], 0);
	PlayerTextDrawUseBox(playerid, loginText[12], true);
	PlayerTextDrawBoxColor(playerid, loginText[12], 102);
	PlayerTextDrawSetShadow(playerid, loginText[12], 0);
	PlayerTextDrawSetOutline(playerid, loginText[12], 0);
	PlayerTextDrawFont(playerid, loginText[12], 0);

	loginText[13] = CreatePlayerTextDraw(playerid, 594.273925, 284.250091, "usebox");
	PlayerTextDrawLetterSize(playerid, loginText[13], 0.000000, 2.016664);
	PlayerTextDrawTextSize(playerid, loginText[13], 451.528503, 0.000000);
	PlayerTextDrawAlignment(playerid, loginText[13], 1);
	PlayerTextDrawColor(playerid, loginText[13], 0);
	PlayerTextDrawUseBox(playerid, loginText[13], true);
	PlayerTextDrawBoxColor(playerid, loginText[13], 102);
	PlayerTextDrawSetShadow(playerid, loginText[13], 0);
	PlayerTextDrawSetOutline(playerid, loginText[13], 0);
	PlayerTextDrawFont(playerid, loginText[13], 0);

	loginText[14] = CreatePlayerTextDraw(playerid, 520.995788, 238.000015, "USERNAME");
	PlayerTextDrawLetterSize(playerid, loginText[14], 0.293045, 1.156666);
	PlayerTextDrawAlignment(playerid, loginText[14], 2);
	PlayerTextDrawColor(playerid, loginText[14], -2139062017);
	PlayerTextDrawSetShadow(playerid, loginText[14], 0);
	PlayerTextDrawSetOutline(playerid, loginText[14], 1);
	PlayerTextDrawBackgroundColor(playerid, loginText[14], 51);
	PlayerTextDrawFont(playerid, loginText[14], 1);
	PlayerTextDrawSetProportional(playerid, loginText[14], 1);
	PlayerTextDrawSetSelectable(playerid, loginText[14], true);

	loginText[15] = CreatePlayerTextDraw(playerid, 521.995849, 287.416687, "PASSWORD");
	PlayerTextDrawLetterSize(playerid, loginText[15], 0.293045, 1.156666);
	PlayerTextDrawAlignment(playerid, loginText[15], 2);
	PlayerTextDrawColor(playerid, loginText[15], -2139062017);
	PlayerTextDrawSetShadow(playerid, loginText[15], 0);
	PlayerTextDrawSetOutline(playerid, loginText[15], 1);
	PlayerTextDrawBackgroundColor(playerid, loginText[15], 51);
	PlayerTextDrawFont(playerid, loginText[15], 1);
	PlayerTextDrawSetProportional(playerid, loginText[15], 1);
	PlayerTextDrawSetSelectable(playerid, loginText[15], true);

	loginText[16] = CreatePlayerTextDraw(playerid, 429.165588, 233.333312, "hud:radar_gangy");
	PlayerTextDrawLetterSize(playerid, loginText[16], 0.000000, 0.000000);
	PlayerTextDrawTextSize(playerid, loginText[16], 22.957565, 23.333343);
	PlayerTextDrawAlignment(playerid, loginText[16], 1);
	PlayerTextDrawColor(playerid, loginText[16], -1);
	PlayerTextDrawSetShadow(playerid, loginText[16], 0);
	PlayerTextDrawSetOutline(playerid, loginText[16], 0);
	PlayerTextDrawFont(playerid, loginText[16], 4);

	loginText[17] = CreatePlayerTextDraw(playerid, 429.696990, 281.000061, "hud:radar_gangy");
	PlayerTextDrawLetterSize(playerid, loginText[17], 0.000000, 0.000000);
	PlayerTextDrawTextSize(playerid, loginText[17], 22.957565, 23.333343);
	PlayerTextDrawAlignment(playerid, loginText[17], 1);
	PlayerTextDrawColor(playerid, loginText[17], -1);
	PlayerTextDrawSetShadow(playerid, loginText[17], 0);
	PlayerTextDrawSetOutline(playerid, loginText[17], 0);
	PlayerTextDrawFont(playerid, loginText[17], 4);

	loginText[18] = CreatePlayerTextDraw(playerid, 580.497924, 5.249999, "ld_grav:timer");
	PlayerTextDrawLetterSize(playerid, loginText[18], 0.000000, 0.000000);
	PlayerTextDrawTextSize(playerid, loginText[18], 17.335296, 15.750000);
	PlayerTextDrawAlignment(playerid, loginText[18], 1);
	PlayerTextDrawColor(playerid, loginText[18], -1);
	PlayerTextDrawSetShadow(playerid, loginText[18], 0);
	PlayerTextDrawSetOutline(playerid, loginText[18], 0);
	PlayerTextDrawFont(playerid, loginText[18], 4);

	loginText[19] = CreatePlayerTextDraw(playerid, 611.420532, 6.416655, "60");
	PlayerTextDrawLetterSize(playerid, loginText[19], 0.449999, 1.600000);
	PlayerTextDrawAlignment(playerid, loginText[19], 2);
	PlayerTextDrawColor(playerid, loginText[19], -1);
	PlayerTextDrawSetShadow(playerid, loginText[19], 0);
	PlayerTextDrawSetOutline(playerid, loginText[19], 1);
	PlayerTextDrawBackgroundColor(playerid, loginText[19], 51);
	PlayerTextDrawFont(playerid, loginText[19], 1);
	PlayerTextDrawSetProportional(playerid, loginText[19], 1);
Problem is that, loginText[1] is ALWAYS selected and if I move the mouse over loginText[3], loginText[5] is selected too, and if I move the mouse over loginText[5], loginText[3] is selected too
Reply
#2

You are using textdraws incorrectly.

1.) These all look like global textdraws to me and should be as such (big waste of code/resources for nothing)
2.) You didn't set the textsizes correctly - PlayerTextDrawTextSize(playerid, loginText[8], 426.228424, 0.000000);
Reply
#3

Quote:
Originally Posted by Pottus
Посмотреть сообщение
You are using textdraws incorrectly.

1.) These all look like global textdraws to me and should be as such (big waste of code/resources for nothing)
2.) You didn't set the textsizes correctly - PlayerTextDrawTextSize(playerid, loginText[8], 426.228424, 0.000000);
I'm not even talking about 8, that is not even visible for now, can you give an answer for my issue with textdraw 1, 3 and 5 instead of just wasting your time?
Reply
#4

You can fix the issue by creating a WHITE sprite which is ld_spac:white ( if i'm correct) at the place you want to be Selectable, It can also be fixed by TextSize , but in an Editor , It's so damn hard..
So Sprite one is better Or you can also use a Model textdraws in it.
That would be like this

BOX

That's my text and i want it to be selectable so I'll create a Sprite TextDraw like this
____
BOX
____

So that it'll cover the box only, And it's better in Selectable, That's what i use in my Selectables.
Reply
#5

I had these issues before with Adri1's TDEditor and with iPLEOMAX's Editor as well and I could not fix it.

I am now using Nick888's Textdraw Editor which is much more better (as far as it concerns for me)

Anyways, check this out: Click here you might find an answer.
Reply
#6

apparently noone noticed but I forgot to change the id of the textdraw... that was the issue

fixed..., rep you guys for wasting your time
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)