Clickable textdraws
#1

I've been struggling with making these textdraws work for a minute now. It's keeping me from progressing into further work. It creates the textdraws but it wont let me select any textdraws. Here's the code, if anyone knows how to fix this.
http://pastebin.com/AkRUCeJ4
Reply
#2

Looks like you've set the selection before showing up the textdraws. I'm not very sure, but give a try to this :
pawn Код:
CMD:menu(playerid, params[])
{
    if(one[playerid] == 0)
    {
        TextDrawShowForPlayer(playerid,MainBox);
        TextDrawShowForPlayer(playerid,title);
        TextDrawShowForPlayer(playerid,Info);
        TextDrawShowForPlayer(playerid,Divider);
        TextDrawShowForPlayer(playerid,Close);
        for(new i; i < 10; i++)
        {
            TextDrawShowForPlayer(playerid, Item[i]);
        }
        one[playerid] = 1;
                SelectTextDraw(playerid,0x33CCFFAA);
    }
    else
    {
        TextDrawHideForPlayer(playerid,MainBox);
        TextDrawHideForPlayer(playerid,title);
        TextDrawHideForPlayer(playerid,Info);
        TextDrawHideForPlayer(playerid,Divider);
        TextDrawHideForPlayer(playerid,Close);
        for(new i; i < 10; i++)
        {
            TextDrawHideForPlayer(playerid, Item[i]);
        }
        one[playerid] = 0;
        CancelSelectTextDraw(playerid);
    }
    return 1;
}
Reply
#3

TextDrawTextSize(Item[6], 0.000000, 0.000000);


This parameter sets selectable area of the textdraw, adjust it according to your textdraw size.
Reply
#4

What might I have to set those parameters too?
Reply
#5

Its the size of the textdraw box (should be called TextDrawBoxSize)
Just enable the box and change to value to fit the text
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)