Is It Possible? Selectable Textdraw Box -
Mamal75 - 30.01.2015
hi
as title says is it possible to make a selectable box ?
i'm using iPLEOMAX's TextDraw Editor (iTD)
i don't want use TextDrawSetPreviewModel ... just a normal box.
thank you in advance
Re: Is It Possible? Selectable Textdraw Box -
Gammix - 30.01.2015
Yes, just make a simple textdraw of font ranging 0 to 4 and make it selectable.
TextDrawUseBox(..), also textdraw boxes are responsible for limiting the selection range in 2d screen.
Re: Is It Possible? Selectable Textdraw Box -
Mamal75 - 30.01.2015
i tried this but didn't work... idk what is problem
Re: Is It Possible? Selectable Textdraw Box -
Mamal75 - 30.01.2015
anybody can help me please ?
why i cant select this textdraws ?
pawn Code:
Textdraw0 = TextDrawCreate(181.200012, 120.219993, "usebox");
TextDrawLetterSize(Textdraw0, 0.000000, 14.933710);
TextDrawTextSize(Textdraw0, 33.200000, 0.000000);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, 0);
TextDrawUseBox(Textdraw0, true);
TextDrawBoxColor(Textdraw0, 41215);
TextDrawSetShadow(Textdraw0, 0);
TextDrawSetOutline(Textdraw0, 0);
TextDrawBackgroundColor(Textdraw0, -2139062017);
TextDrawFont(Textdraw0, 1);
TextDrawSetSelectable(Textdraw0, true);
Textdraw1 = TextDrawCreate(384.599548, 122.713256, "usebox");
TextDrawLetterSize(Textdraw1, 0.000000, 14.853706);
TextDrawTextSize(Textdraw1, 237.199951, 0.000000);
TextDrawAlignment(Textdraw1, 1);
TextDrawColor(Textdraw1, 0);
TextDrawUseBox(Textdraw1, true);
TextDrawBoxColor(Textdraw1, -5963521);
TextDrawSetShadow(Textdraw1, 0);
TextDrawSetOutline(Textdraw1, 0);
TextDrawFont(Textdraw1, 1);
TextDrawSetSelectable(Textdraw1, true);
when i click on boxes, nothing happen
pawn Code:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == Textdraw0) SendClientMessage(playerid, -1, "TD0!");
else if(clickedid == Textdraw1) SendClientMessage(playerid, -1, "TD1!");
else if(_:clickedid == INVALID_TEXT_DRAW)
{
SelectTextDraw(playerid, 0xFF0000FF);
SendClientMessage(playerid, -1, "Don't Cancel Selection!");
}
return 1;
}
Re: Is It Possible? Selectable Textdraw Box -
Vince - 30.01.2015
Did you read the wiki? Specifically the note? TextDrawTextSize values must not be 0. You will have to guess the height of the box (or take a screenshot, resize it to 640x480 and then measure it with the ruler tool in Photoshop).
Re: Is It Possible? Selectable Textdraw Box -
Mamal75 - 30.01.2015
Quote:
Originally Posted by Vince
Did you read the wiki? Specifically the note? TextDrawTextSize values must not be 0. You will have to guess the height of the box (or take a screenshot, resize it to 640x480 and then measure it with the ruler tool in Photoshop).
|
Thank you so much Vince
Can i ask you for a help ?
Can you please explain me HOW TextdrawTextSize works ?
I mean what is X and Y parameters ?
Y is height of selectable area ?
I repped you for your help
Thank you in advance
Re: Is It Possible? Selectable Textdraw Box -
Vince - 30.01.2015
Quote:
Originally Posted by Mamal75
Thank you so much Vince
I mean what is X and Y parameters ?
Y is height of selectable area ?
|
Yes, Y is height. The height of the box is normally automatically calculated from the text it contains (TextDrawLetterSize plus the amount of lines) unless TextDrawTextSize is used.