Problems with selecting textdraws?
#1

pawn Код:
stock CreateTextdraws ( )
{
    startup1 = TextDrawCreate(0.000000, -2.000000, "_~n~_~n~_~n~_~n~_~n~_~n~_~n~");
    TextDrawBackgroundColor(startup1, 255);
    TextDrawFont(startup1, 1);
    TextDrawLetterSize(startup1, 0.500000, 1.000000);
    TextDrawColor(startup1, -1);
    TextDrawSetOutline(startup1, 0);
    TextDrawSetProportional(startup1, 1);
    TextDrawSetShadow(startup1, 1);
    TextDrawUseBox(startup1, 1);
    TextDrawBoxColor(startup1, -1777463553);
    TextDrawTextSize(startup1, 680.000000, 0.000000);
    TextDrawSetSelectable(startup1, false);

    startup2 = TextDrawCreate(0.000000, 388.000000, "_~n~_~n~_~n~_~n~_~n~_~n~_~n~");
    TextDrawBackgroundColor(startup2, 255);
    TextDrawFont(startup2, 1);
    TextDrawLetterSize(startup2, 0.500000, 1.000000);
    TextDrawColor(startup2, -1);
    TextDrawSetOutline(startup2, 0);
    TextDrawSetProportional(startup2, 1);
    TextDrawSetShadow(startup2, 1);
    TextDrawUseBox(startup2, 1);
    TextDrawBoxColor(startup2, -1777463553);
    TextDrawTextSize(startup2, 680.000000, 0.000000);
    TextDrawSetSelectable(startup2, false);
   
    startup3 = TextDrawCreate(648.000000, 65.000000, "_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~");
    TextDrawBackgroundColor(startup3, 255);
    TextDrawFont(startup3, 1);
    TextDrawLetterSize(startup3, 0.500000, 1.000000);
    TextDrawColor(startup3, -1);
    TextDrawSetOutline(startup3, 0);
    TextDrawSetProportional(startup3, 1);
    TextDrawSetShadow(startup3, 1);
    TextDrawUseBox(startup3, 1);
    TextDrawBoxColor(startup3, 255);
    TextDrawTextSize(startup3, 490.000000, -23.000000);
    TextDrawSetSelectable(startup3, false);
   
    startup4 = TextDrawCreate(648.000000, 96.000000, "_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~");
    TextDrawBackgroundColor(startup4, 255);
    TextDrawFont(startup4, 1);
    TextDrawLetterSize(startup4, 0.500000, 1.000000);
    TextDrawColor(startup4, -1);
    TextDrawSetOutline(startup4, 0);
    TextDrawSetProportional(startup4, 1);
    TextDrawSetShadow(startup4, 1);
    TextDrawUseBox(startup4, 1);
    TextDrawBoxColor(startup4, 255);
    TextDrawTextSize(startup4, 490.000000, -23.000000);
    TextDrawSetSelectable(startup4, false);
   
    startup5 = TextDrawCreate(430.000000, 20.000000, "Welcome to");
    TextDrawBackgroundColor(startup5, 255);
    TextDrawFont(startup5, 2);
    TextDrawLetterSize(startup5, 0.500000, 1.000000);
    TextDrawColor(startup5, -1);
    TextDrawSetOutline(startup5, 0);
    TextDrawSetProportional(startup5, 1);
    TextDrawSetShadow(startup5, 1);
    TextDrawSetSelectable(startup5, false);
   
    startup6 = TextDrawCreate(532.000000, 32.000000, "newmode!");
    TextDrawBackgroundColor(startup6, 255);
    TextDrawFont(startup6, 2);
    TextDrawLetterSize(startup6, 0.500000, 1.000000);
    TextDrawColor(startup6, -1);
    TextDrawSetOutline(startup6, 0);
    TextDrawSetProportional(startup6, 1);
    TextDrawSetShadow(startup6, 1);
    TextDrawSetSelectable(startup6, false);
   
    startup7 = TextDrawCreate(548.000000, 74.000000, "Menu");
    TextDrawBackgroundColor(startup7, 255);
    TextDrawFont(startup7, 1);
    TextDrawLetterSize(startup7, 0.500000, 1.000000);
    TextDrawColor(startup7, -1);
    TextDrawSetOutline(startup7, 0);
    TextDrawSetProportional(startup7, 1);
    TextDrawSetShadow(startup7, 1);
    TextDrawSetSelectable(startup7, false);
   
    startup8 = TextDrawCreate(508.000000, 104.000000, "Create an account");
    TextDrawBackgroundColor(startup8, 255);
    TextDrawFont(startup8, 1);
    TextDrawLetterSize(startup8, 0.400000, 2.000000);
    TextDrawColor(startup8, -1);
    TextDrawSetOutline(startup8, 0);
    TextDrawSetProportional(startup8, 1);
    TextDrawSetShadow(startup8, 1);
    TextDrawSetSelectable(startup8, true);
   
    startup9 = TextDrawCreate(508.000000, 156.000000, "Login");
    TextDrawBackgroundColor(startup9, 255);
    TextDrawFont(startup9, 1);
    TextDrawLetterSize(startup9, 0.500000, 2.000000);
    TextDrawColor(startup9, -1);
    TextDrawSetOutline(startup9, 0);
    TextDrawSetProportional(startup9, 1);
    TextDrawSetShadow(startup9, 1);
    TextDrawSetSelectable(startup9, true);
   
    startup10 = TextDrawCreate(508.000000, 204.000000, "Information");
    TextDrawBackgroundColor(startup10, 255);
    TextDrawFont(startup10, 1);
    TextDrawLetterSize(startup10, 0.500000, 2.000000);
    TextDrawColor(startup10, -1);
    TextDrawSetOutline(startup10, 0);
    TextDrawSetProportional(startup10, 1);
    TextDrawSetShadow(startup10, 1);
    TextDrawSetSelectable(startup10, true);
   
    startup11 = TextDrawCreate(549.000000, 79.000000, "------");
    TextDrawBackgroundColor(startup11, 255);
    TextDrawFont(startup11, 1);
    TextDrawLetterSize(startup11, 0.500000, 1.000000);
    TextDrawColor(startup11, -1);
    TextDrawSetOutline(startup11, 0);
    TextDrawSetProportional(startup11, 1);
    TextDrawSetShadow(startup11, 1);
    TextDrawSetSelectable(startup11, false);
   
    startup12 = TextDrawCreate(10.000000, 407.000000, "Build: R1");
    TextDrawBackgroundColor(startup12, 255);
    TextDrawFont(startup12, 2);
    TextDrawLetterSize(startup12, 0.500000, 2.000000);
    TextDrawColor(startup12, -1);
    TextDrawSetOutline(startup12, 0);
    TextDrawSetProportional(startup12, 1);
    TextDrawSetShadow(startup12, 1);
    TextDrawSetSelectable(startup12, false);
   
    startup13 = TextDrawCreate(437.000000, 397.000000, "Players online");
    TextDrawBackgroundColor(startup13, 255);
    TextDrawFont(startup13, 2);
    TextDrawLetterSize(startup13, 0.400000, 2.000000);
    TextDrawColor(startup13, -1);
    TextDrawSetOutline(startup13, 0);
    TextDrawSetProportional(startup13, 1);
    TextDrawSetShadow(startup13, 1);
    TextDrawSetSelectable(startup13, false);
   
    startup14 = TextDrawCreate(579.000000, 409.000000, "~y~-~w~/-");
    TextDrawBackgroundColor(startup14, 255);
    TextDrawFont(startup14, 2);
    TextDrawLetterSize(startup14, 0.400000, 2.000000);
    TextDrawColor(startup14, -1);
    TextDrawSetOutline(startup14, 0);
    TextDrawSetProportional(startup14, 1);
    TextDrawSetShadow(startup14, 1);
    TextDrawSetSelectable(startup14, false);
   
    startup15 = TextDrawCreate(501.000000, 375.000000, "[c] SKYMOD");
    TextDrawBackgroundColor(startup15, 255);
    TextDrawFont(startup15, 3);
    TextDrawLetterSize(startup15, 0.600000, 1.000000);
    TextDrawColor(startup15, 16777215);
    TextDrawSetOutline(startup15, 0);
    TextDrawSetProportional(startup15, 1);
    TextDrawSetShadow(startup15, 1);
    TextDrawSetSelectable(startup15, false);
    return true;
}
This is how I show the textdraws, and allow them to be selectable

pawn Код:
public OnPlayerConnect(playerid)
{
    ShowStartupTextdraws ( playerid );
   
    TogglePlayerSpectating( playerid, true );
   
    ConnectedPlayers ++;
   
    SendClientMessage( playerid, -1, .. );
   
    SelectTextDraw( playerid, 0xC90411FF );
    return 1;
}
When I hover over one option, it selects two or all of the options. How do I fix this?

A reply I got on an old thread (in the wrong section) was:

Quote:
Originally Posted by MP2
Посмотреть сообщение
Look at your TextDrawTextSize lines. That is what defines the 'clickable area'. Some are set to minus values and some 0.
Can someone assist me further? I have no idea what I'm doing in this area.
Reply


Messages In This Thread
Problems with selecting textdraws? - by 2KY - 15.04.2012, 15:25
Re: Problems with selecting textdraws? - by MP2 - 15.04.2012, 16:29
Re: Problems with selecting textdraws? - by 2KY - 15.04.2012, 16:40
Re: Problems with selecting textdraws? - by MP2 - 15.04.2012, 17:36
Re: Problems with selecting textdraws? - by 2KY - 15.04.2012, 17:59
Re: Problems with selecting textdraws? - by Hiddos - 15.04.2012, 18:07
Re: Problems with selecting textdraws? - by 2KY - 15.04.2012, 18:17
Re: Problems with selecting textdraws? - by kizla - 15.04.2012, 18:23
Re: Problems with selecting textdraws? - by MP2 - 15.04.2012, 18:32

Forum Jump:


Users browsing this thread: 1 Guest(s)