TextDrawSetSelectable doesn't work... ?
#1

Hi, I'm using 0.3e RC4, and I wanted to test out TextDrawSetSelectable.
In OnGameModeInit, after creating the two textdraws I wanted to make selectable, I did this:
pawn Код:
TextDrawSetSelectable(txd_plr_DSM_003, 1);
TextDrawSetSelectable(txd_plr_DSM_002, 1);
I made it so that the textdraws are shown when I use /mycommand (random command name, really. I was just testing!)
There, I also do this:
pawn Код:
SelectTextDraw(playerid, 0x66FF6633);
Both textdraws are BOXES. Unfortunately, I cannot select them with the mouse cursor.
When I click them, nothing happens.
And in OnPlayerClickTextDraw, I have it like so:
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid) {
    if(clickedid == txd_plr_DSM_002 || clickedid == txd_plr_DSM_003) {
        HidePlayerDialogTextdraws(playerid); // this stock contains custom code which hides all the dialog textdraws. I'm sure you don't need it to help me.
        CancelSelectTextDraw(playerid);
    }
    printf("Clicked TXD");
}
Yes, I have also tried this with text textdraws and tried the set box, do this, hide box, do that method and it doesn't work, either.
There must be something I'm missing! Can anyone help me?

...
if it helps you with anything, here you go: (click to enlarge the image)
Reply
#2

Confirmed. This works once only.
Reply
#3

Show TextDrawTextSize line.
Reply
#4

Quote:
Originally Posted by kacper55331
Посмотреть сообщение
Show TextDrawTextSize line.
For me ?
Reply
#5

Same here
Reply
#6

Did you set the textdrawtextsize, as mentioned in the RC4 post?
Reply
#7

Maybe you made your Textdraw like this

pawn Код:
TextDrawTextSize(txd_plr_DSM_003, 400.000000, 0.000000);
it should be
pawn Код:
TextDrawTextSize(txd_plr_DSM_003, 400.000000, 15.000000);
Reply
#8

pawn Код:
txd_plr_DSM_002 = TextDrawCreate(291.000000, 304.000000, "~n~"); // The box behind the OK button
            TextDrawBackgroundColor(txd_plr_DSM_002, 255);
            TextDrawFont(txd_plr_DSM_002, 1);
            TextDrawLetterSize(txd_plr_DSM_002, 0.400000, 2.200000);
            TextDrawColor(txd_plr_DSM_002, 255);
            TextDrawSetOutline(txd_plr_DSM_002, 0);
            TextDrawSetProportional(txd_plr_DSM_002, 1);
            TextDrawSetShadow(txd_plr_DSM_002, 1);
            TextDrawUseBox(txd_plr_DSM_002, 1);
            TextDrawBoxColor(txd_plr_DSM_002, 538976320);
            TextDrawTextSize(txd_plr_DSM_002, 190.000000, 70.000000);
            TextDrawSetSelectable(txd_plr_DSM_002, 1);

            txd_plr_DSM_003 = TextDrawCreate(450.000000, 304.000000, "~n~"); // The box behind the Cancel button
            TextDrawBackgroundColor(txd_plr_DSM_003, 255);
            TextDrawFont(txd_plr_DSM_003, 1);
            TextDrawLetterSize(txd_plr_DSM_003, 0.400000, 2.200000);
            TextDrawColor(txd_plr_DSM_003, 255);
            TextDrawSetOutline(txd_plr_DSM_003, 0);
            TextDrawSetProportional(txd_plr_DSM_003, 1);
            TextDrawSetShadow(txd_plr_DSM_003, 1);
            TextDrawUseBox(txd_plr_DSM_003, 1);
            TextDrawBoxColor(txd_plr_DSM_003, 538976320);
            TextDrawTextSize(txd_plr_DSM_003, 350.000000, 70.000000);
            TextDrawSetSelectable(txd_plr_DSM_003, 1);
I tried using TextDrawSetSelectable with the OK and Cancel actual texts too, but I had the same problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)