clickable textdraws
#1

Hey I have problems with text draws.. when I click on them nothing happen :/

pawn Код:
#define DIALOG_CHOOSEUSERNAME 4
#define DIALOG_CHOOSEPASSWORD 5
pawn Код:
TDEditor_TD[14] = TextDrawCreate(330.333648, 246.829437, "Insert Here");
    TextDrawLetterSize(TDEditor_TD[14], 0.186664, 0.409482);
    TextDrawTextSize(TDEditor_TD[14], 5.000000, 52.333400); //52.333400
    TextDrawAlignment(TDEditor_TD[14], 2);
    TextDrawColor(TDEditor_TD[14], -16776961);
    TextDrawUseBox(TDEditor_TD[14], 1);
    TextDrawBoxColor(TDEditor_TD[14], -1378294017);
    TextDrawSetShadow(TDEditor_TD[14], 0);
    TextDrawSetOutline(TDEditor_TD[14], 0);
    TextDrawBackgroundColor(TDEditor_TD[14], 255);
    TextDrawFont(TDEditor_TD[14], 2);
    TextDrawSetProportional(TDEditor_TD[14], 1);
    TextDrawSetShadow(TDEditor_TD[14], 0);
    TextDrawSetSelectable(TDEditor_TD[14], true);

    TDEditor_TD[15] = TextDrawCreate(330.333618, 256.784851, "Insert Here");
    TextDrawLetterSize(TDEditor_TD[15], 0.188997, 0.401185);
    TextDrawTextSize(TDEditor_TD[15], 5.000000, 52.333400); //52.333393
    TextDrawAlignment(TDEditor_TD[15], 2);
    TextDrawColor(TDEditor_TD[15], -16776961);
    TextDrawUseBox(TDEditor_TD[15], 1);
    TextDrawBoxColor(TDEditor_TD[15], -1378294017);
    TextDrawSetShadow(TDEditor_TD[15], 0);
    TextDrawSetOutline(TDEditor_TD[15], 0);
    TextDrawBackgroundColor(TDEditor_TD[15], 255);
    TextDrawFont(TDEditor_TD[15], 2);
    TextDrawSetProportional(TDEditor_TD[15], 1);
    TextDrawSetShadow(TDEditor_TD[15], 0);
    TextDrawSetSelectable(TDEditor_TD[15], true);
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    new p_string[128];
    if(clickedid == TDEditor_TD[14]) // Username
    {
        ShowPlayerDialog(playerid, DIALOG_CHOOSEUSERNAME, DIALOG_STYLE_INPUT,""COL_GREEN"Choose your Username",""COL_WHITE"Please choose your Username \nUsername lenght must be between 4-10 letters","Confirm","Abort");
    }
    if(clickedid == TDEditor_TD[15]) // Password
    {
        ShowPlayerDialog(playerid, DIALOG_CHOOSEPASSWORD, DIALOG_STYLE_PASSWORD,""COL_GREEN"Choose your Password",""COL_WHITE"Please choose your Password\nPassword length must be between 4-10 letters","Confirm","Abort");
    }
    return 1;
}
Reply
#2

SelectTextDraw(playerid, color);
Reply
#3

I have that under OnPlayerConnect, whenever I choose clickable textdraw it change the color to what I set, but no effect.. like it doesn't even detect "public OnPlayerClickTextDraw(playerid, Text:clickedid)"..
Reply
#4

Try increasing
pawn Код:
TextDrawTextSize(TDEditor_TD[14], 5.000000, 52.333400);
To something like
pawn Код:
TextDrawTextSize(TDEditor_TD[14], 40.000000, 52.333400);

It might help out.
Reply
#5

Nah clicked anywhere on screen also, still no effect, it seems it's bugged function..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)