View Full Version : Issue with Selectable Textdraws

12/06/2012, 11:27 AM
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;

12/06/2012, 09:34 PM
Up... I really need this.

12/06/2012, 10:54 PM
Alter the TextDrawTextSize. It's covering the coordinates of both of your textdraws.

13/06/2012, 03:16 AM
Change the TextDrawTextSize in a way, it must not coincide with the other TD. Try altering it till the problem is fixed.

13/06/2012, 09:33 AM
I tried with

TextDrawTextSize(Textdraw0, 50.0, 5.0); For the first
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...

13/06/2012, 09:42 AM
It's swapped for center-aligned textdraws. Change it to 5, 50.

EDIT: Yours isn't center-aligned though D:

13/06/2012, 09:51 AM
So should I align it to the center?

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.

15/06/2012, 11:06 AM
UP, please :(