12.06.2012, 10:27
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:
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;
}

