Issue with Selectable Textdraws -
WiredGuyX - 12.06.2012
Hi,
I have a trouble with some selectable textdraws.
When I select the highest, it colours itself. But when I select the lower one, BOTH are coloured. Both are selected. I tried to activate the box, using TextDrawTextSize and putting a "0" value to Y, or a negative value.
But the selection still continue even below the colored box.
See screenshot for more info.
(Sorry if I used a bad english, I'm not mother tongue)
This is actually the code:
Код:
public OnFilterScriptInit()
{
Textdraw0_inizio = TextDrawCreate(42.000000, 185.000000, "Inizia Allenamento");
TextDrawBackgroundColor(Textdraw0_inizio, 8913151);
TextDrawFont(Textdraw0_inizio, 3);
TextDrawLetterSize(Textdraw0_inizio, 0.869998, 3.199999);
TextDrawColor(Textdraw0_inizio, 16711935);
TextDrawSetOutline(Textdraw0_inizio, 1);
TextDrawSetProportional(Textdraw0_inizio, 1);
TextDrawUseBox(Textdraw0_inizio, 1);
TextDrawTextSize(Textdraw0, 332.000000, -330.000000);
Textdraw1_opzioni = TextDrawCreate(40.000000, 260.000000, "Opzioni Allenamento");
TextDrawBackgroundColor(Textdraw1_opzioni, 255);
TextDrawFont(Textdraw1_opzioni, 3);
TextDrawLetterSize(Textdraw1_opzioni, 0.800000, 3.000000);
TextDrawColor(Textdraw1_opzioni, -5963521);
TextDrawSetOutline(Textdraw1_opzioni, 1);
TextDrawSetProportional(Textdraw1_opzioni, 1);
TextDrawUseBox(Textdraw1_opzioni, 1);
TextDrawTextSize(Textdraw1, 327.000000, 0.000000);
//
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == PickupPoligono)
{
TextDrawShowForPlayer(playerid, Textdraw0_inizio);
TextDrawShowForPlayer(playerid, Textdraw1_opzioni);
TextDrawSetSelectable(Text:Textdraw0_inizio, 1);
TextDrawSetSelectable(Text:Textdraw1_opzioni, 1);
SelectTextDraw(playerid, 0xFFFF00FF);
}
return 1;
}
Re: Issue with Selectable Textdraws -
WiredGuyX - 12.06.2012
Up... I really need this.
Re: Issue with Selectable Textdraws -
MP2 - 12.06.2012
Alter the TextDrawTextSize. It's covering the coordinates of both of your textdraws.
Re: Issue with Selectable Textdraws -
Faisal_khan - 13.06.2012
Change the TextDrawTextSize in a way, it must not coincide with the other TD. Try altering it till the problem is fixed.
Re: Issue with Selectable Textdraws -
WiredGuyX - 13.06.2012
I tried with
Код:
TextDrawTextSize(Textdraw0, 50.0, 5.0);
For the first
and
Код:
TextDrawTextSize(Textdraw1, 50.0, 5.0);
For the second...
I tought 5 y-units were right, but the first still occupies the area of the second...
Re: Issue with Selectable Textdraws -
MP2 - 13.06.2012
It's swapped for center-aligned textdraws. Change it to 5, 50.
EDIT: Yours isn't center-aligned though D:
Re: Issue with Selectable Textdraws -
WiredGuyX - 13.06.2012
So should I align it to the center?
EDIT:
I tried to align, invert coordinates... textdraws are moved to the left, but same result with colors / selection
Tried to simply invert coordinates... same result.
Re: Issue with Selectable Textdraws -
WiredGuyX - 15.06.2012
UP, please