new PlayerText:MN_BotaoIR[MAX_PLAYERS];
MN_BotaoIR[playerid] = CreatePlayerTextDraw(playerid, 375.500000, 238.933288, ">");
PlayerTextDrawLetterSize(playerid, MN_BotaoIR[playerid], 0.715499, 3.740442);
PlayerTextDrawAlignment(playerid, MN_BotaoIR[playerid], 1);
PlayerTextDrawColor(playerid, MN_BotaoIR[playerid], -1);
PlayerTextDrawSetShadow(playerid, MN_BotaoIR[playerid], 0);
PlayerTextDrawSetOutline(playerid, MN_BotaoIR[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, MN_BotaoIR[playerid], 51);
PlayerTextDrawFont(playerid, MN_BotaoIR[playerid], 1);
PlayerTextDrawSetProportional(playerid, MN_BotaoIR[playerid], 1);
PlayerTextDrawTextSize(playerid, MN_BotaoIR[playerid], 10.000000, 10.000000);
PlayerTextDrawSetSelectable(playerid, MN_BotaoIR[playerid], true);
Can someone help me? I have a problem with Selectable Text Draw's, I searched a lot for the internet and in wiki's, I followed the tutorials, but I'm still facing the same problem.
My case is as follows, Text Draw was supposed to change color when the mouse cursor is on top of it, however it changes color when the mouse is in another position away from TXD, I tried to alter the PlayerTextDrawTextSize but I still can not make work My declaration: pawn Code:
pawn Code:
|
Let me guess you're using iPleomax's TDEditor? If not just use it, it's by far the most user friendly ever. And there is an icon "size" to play with the size.
|
MN_BotaoSAIR[playerid] = CreatePlayerTextDraw(playerid, 360.500000, 383.044464, "SAIR");
PlayerTextDrawLetterSize(playerid, MN_BotaoSAIR[playerid], 0.324999, 1.245332);
PlayerTextDrawTextSize(playerid, MN_BotaoSAIR[playerid], 345.000000, 15.000000);
PlayerTextDrawAlignment(playerid, MN_BotaoSAIR[playerid], 1);
PlayerTextDrawColor(playerid, MN_BotaoSAIR[playerid], -1);
PlayerTextDrawSetShadow(playerid, MN_BotaoSAIR[playerid], 0);
PlayerTextDrawSetOutline(playerid, MN_BotaoSAIR[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, MN_BotaoSAIR[playerid], 51);
PlayerTextDrawFont(playerid, MN_BotaoSAIR[playerid], 2);
PlayerTextDrawSetProportional(playerid, MN_BotaoSAIR[playerid], 1);
PlayerTextDrawSetSelectable(playerid, MN_BotaoSAIR[playerid], true);
FecharMN_Tudo(playerid)
{
PlayerTextDrawHide(playerid, MN_BotaoSAIR[playerid]);
}
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == MN_BotaoSAIR[playerid])
{
FecharMN_Tudo(playerid);
}
return 1;
}
PlayerTextDrawTextSize(playerid, MN_BotaoSAIR[playerid], 345.000000, 15.000000);
PlayerTextDrawTextSize(playerid, MN_BotaoSAIR[playerid], 390.000000, 10.000000);
Change this line:
Code:
PlayerTextDrawTextSize(playerid, MN_BotaoSAIR[playerid], 345.000000, 15.000000); Code:
PlayerTextDrawTextSize(playerid, MN_BotaoSAIR[playerid], 390.000000, 10.000000); Also, TextDrawSize X parameter has to be higher than textdraw's X position (So 345 is not correct) |