SA-MP Forums Archive
TextDrawSetSelectable doesn't work... ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: TextDrawSetSelectable doesn't work... ? (/showthread.php?tid=327701)



TextDrawSetSelectable doesn't work... ? - TheBetaFox - 22.03.2012

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)



Re : TextDrawSetSelectable doesn't work... ? - jimmy_Krapovich - 22.03.2012

Confirmed. This works once only.


Re: TextDrawSetSelectable doesn't work... ? - kacper55331 - 22.03.2012

Show TextDrawTextSize line.


Re : Re: TextDrawSetSelectable doesn't work... ? - jimmy_Krapovich - 22.03.2012

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


AW: TextDrawSetSelectable doesn't work... ? - Meta - 22.03.2012

Same here


Re: TextDrawSetSelectable doesn't work... ? - Memoryz - 22.03.2012

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


AW: TextDrawSetSelectable doesn't work... ? - NetKiel - 22.03.2012

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);



Re: TextDrawSetSelectable doesn't work... ? - TheBetaFox - 22.03.2012

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.