Problem with selectable textdraws
#1

There is 3selectable textdraws (Select, <- Prev and Next ->)
When I hover mouse to Select, it works fine but when i hover mouse to Prev or Next, it selects multi options



If i hover cursor to Prev, it selects all options that are available

Textdraw
PHP Code:
new PlayerText:SkinSelectTD[MAX_PLAYERS][5];
public 
OnPlayerConnect(playerid){
    
SkinSelectTD[playerid][0] = CreatePlayerTextDraw(playerid121.332351129.916671"box");
    
PlayerTextDrawLetterSize(playeridSkinSelectTD[playerid][0], 0.00000028.319175);
    
PlayerTextDrawTextSize(playeridSkinSelectTD[playerid][0], 262.0000000.000000);
    
PlayerTextDrawAlignment(playeridSkinSelectTD[playerid][0], 1);
    
PlayerTextDrawColor(playeridSkinSelectTD[playerid][0], -1);
    
PlayerTextDrawUseBox(playeridSkinSelectTD[playerid][0], 1);
    
PlayerTextDrawBoxColor(playeridSkinSelectTD[playerid][0], 130);
    
PlayerTextDrawSetShadow(playeridSkinSelectTD[playerid][0], 0);
    
PlayerTextDrawSetOutline(playeridSkinSelectTD[playerid][0], 0);
    
PlayerTextDrawBackgroundColor(playeridSkinSelectTD[playerid][0], 255);
    
PlayerTextDrawFont(playeridSkinSelectTD[playerid][0], 1);
    
PlayerTextDrawSetProportional(playeridSkinSelectTD[playerid][0], 1);
    
PlayerTextDrawSetShadow(playeridSkinSelectTD[playerid][0], 0);
    
SkinSelectTD[playerid][1] = CreatePlayerTextDraw(playerid125.849227137.500045"");
    
PlayerTextDrawLetterSize(playeridSkinSelectTD[playerid][1], 0.0000000.000000);
    
PlayerTextDrawTextSize(playeridSkinSelectTD[playerid][1], 132.000000186.000000);
    
PlayerTextDrawAlignment(playeridSkinSelectTD[playerid][1], 1);
    
PlayerTextDrawColor(playeridSkinSelectTD[playerid][1], -1);
    
PlayerTextDrawSetShadow(playeridSkinSelectTD[playerid][1], 0);
    
PlayerTextDrawSetOutline(playeridSkinSelectTD[playerid][1], 0);
    
PlayerTextDrawBackgroundColor(playeridSkinSelectTD[playerid][1], 65);
    
PlayerTextDrawFont(playeridSkinSelectTD[playerid][1], 5);
    
PlayerTextDrawSetProportional(playeridSkinSelectTD[playerid][1], 0);
    
PlayerTextDrawSetShadow(playeridSkinSelectTD[playerid][1], 0);
    
PlayerTextDrawSetPreviewModel(playeridSkinSelectTD[playerid][1], 0);
    
PlayerTextDrawSetPreviewRot(playeridSkinSelectTD[playerid][1], 0.0000000.0000000.0000001.000000);
    
SkinSelectTD[playerid][2] = CreatePlayerTextDraw(playerid167.715972366.166717"<Prev");
    
PlayerTextDrawLetterSize(playeridSkinSelectTD[playerid][2], 0.4000001.600000);
    
PlayerTextDrawAlignment(playeridSkinSelectTD[playerid][2], 1);
    
PlayerTextDrawColor(playeridSkinSelectTD[playerid][2], -2139062017);
    
PlayerTextDrawSetShadow(playeridSkinSelectTD[playerid][2], 0);
    
PlayerTextDrawSetOutline(playeridSkinSelectTD[playerid][2], 0);
    
PlayerTextDrawBackgroundColor(playeridSkinSelectTD[playerid][2], 255);
    
PlayerTextDrawFont(playeridSkinSelectTD[playerid][2], 1);
    
PlayerTextDrawSetProportional(playeridSkinSelectTD[playerid][2], 1);
    
PlayerTextDrawSetShadow(playeridSkinSelectTD[playerid][2], 0);
    
PlayerTextDrawSetSelectable(playeridSkinSelectTD[playerid][2], true);
    
SkinSelectTD[playerid][3] = CreatePlayerTextDraw(playerid173.338195348.666870"Next>");
    
PlayerTextDrawLetterSize(playeridSkinSelectTD[playerid][3], 0.4000001.600000);
    
PlayerTextDrawAlignment(playeridSkinSelectTD[playerid][3], 1);
    
PlayerTextDrawColor(playeridSkinSelectTD[playerid][3], -2139062017);
    
PlayerTextDrawSetShadow(playeridSkinSelectTD[playerid][3], 0);
    
PlayerTextDrawSetOutline(playeridSkinSelectTD[playerid][3], 0);
    
PlayerTextDrawBackgroundColor(playeridSkinSelectTD[playerid][3], 226);
    
PlayerTextDrawFont(playeridSkinSelectTD[playerid][3], 1);
    
PlayerTextDrawSetProportional(playeridSkinSelectTD[playerid][3], 1);
    
PlayerTextDrawSetShadow(playeridSkinSelectTD[playerid][3], 0);
    
PlayerTextDrawSetSelectable(playeridSkinSelectTD[playerid][3], true);
    
SkinSelectTD[playerid][4] = CreatePlayerTextDraw(playerid172.401123332.333251"Select");
    
PlayerTextDrawLetterSize(playeridSkinSelectTD[playerid][4], 0.4000001.600000);
    
PlayerTextDrawAlignment(playeridSkinSelectTD[playerid][4], 1);
    
PlayerTextDrawColor(playeridSkinSelectTD[playerid][4], -2139062017);
    
PlayerTextDrawSetShadow(playeridSkinSelectTD[playerid][4], 0);
    
PlayerTextDrawSetOutline(playeridSkinSelectTD[playerid][4], 0);
    
PlayerTextDrawBackgroundColor(playeridSkinSelectTD[playerid][4], 255);
    
PlayerTextDrawFont(playeridSkinSelectTD[playerid][4], 1);
    
PlayerTextDrawSetProportional(playeridSkinSelectTD[playerid][4], 1);
    
PlayerTextDrawSetShadow(playeridSkinSelectTD[playerid][4], 0);
    
PlayerTextDrawSetSelectable(playeridSkinSelectTD[playerid][4], true);
    return 
1;

Reply
#2

I've had these things before. Someone pointed out that adding (if memory serves right) PlayerTextDrawTextSize() for the selectable draws takes care of it, if using the right sizes. Your clickable draws don't seem to have this yet, so you could try that. I usually start with small dimensions and work my way up until they're good.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)