open.mp forum
[Server] Selectable TEXT_DRAW_ALIGN_LEFT problem - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Support (https://forum.open.mp/forumdisplay.php?fid=12)
--- Thread: [Server] Selectable TEXT_DRAW_ALIGN_LEFT problem (/showthread.php?tid=2841)



Selectable TEXT_DRAW_ALIGN_LEFT problem - LASEE - 2024-07-28

So i was making a register system with textdraw. The textdraw would be Selectable. The problem here is when the PlayerTextDrawAlignment is set to TEXT_DRAW_ALIGN_CENTER then the textdraw can be selected and everything works fine but when is changed to TEXT_DRAW_ALIGN_LEFT then the button is not selectable anymore. Using left or right this problem is happening but using center its working fine. Im using the omp version btw. I was told but also saw(saw on some server) on version 037 even if its ALIGN_LEFT OR RIGHT you can select the textdraw.
My question is, is that some type of bug on omp or something else?

Here is the code:
RegisterTD[playerid][18] = CreatePlayerTextDraw(playerid, 326.000000, 393.000000, "REGISTER NOW");
        PlayerTextDrawFont(playerid, RegisterTD[playerid][18], TEXT_DRAW_FONT_2);
        PlayerTextDrawLetterSize(playerid, RegisterTD[playerid][18], 0.258332, 1.500000);
        PlayerTextDrawTextSize(playerid, RegisterTD[playerid][18], 16.500000, 75.500000);
        PlayerTextDrawSetOutline(playerid, RegisterTD[playerid][18], 0);
        PlayerTextDrawSetShadow(playerid, RegisterTD[playerid][18], 0);
        PlayerTextDrawAlignment(playerid, RegisterTD[playerid][18], TEXT_DRAW_ALIGN_CENTER);
        PlayerTextDrawColour(playerid, RegisterTD[playerid][18], -1);
        PlayerTextDrawBackgroundColour(playerid, RegisterTD[playerid][18], 255);
        PlayerTextDrawBoxColour(playerid, RegisterTD[playerid][18], 200);
        PlayerTextDrawUseBox(playerid, RegisterTD[playerid][18], false);
        PlayerTextDrawSetProportional(playerid, RegisterTD[playerid][18], true);
        PlayerTextDrawSetSelectable(playerid, RegisterTD[playerid][18], true);



RE: Selectable TEXT_DRAW_ALIGN_LEFT problem - samuelmatheus0502 - 2024-08-02

I recommend that you place the box at maximum opacity and see if it is getting misaligned from the text, because when you change the way you align the text, the box changes size, and the box simulates the clickable part.